About this site

A small tool, and the reasoning behind it

Docs 2 HTML turns documents into HTML you'd be willing to put your name on. That's the whole product.

It's built and maintained by one independent developer, and it runs entirely inside your browser.

In effect since 2026-08-04

Why this exists

Every writing tool can already export HTML. That's the problem. Word's Save As Web Page produces thousands of lines with an mso- style attribute on nearly every element. Google Docs hands you class names like c1 and c17 that reference a stylesheet you didn't get. Both are technically HTML and both are unusable as the source of a web page — you can't read them, can't edit them, and can't paste them into a template without them fighting your CSS.

What people actually want is the markup they would have written by hand: an <h2> where there's a heading, a <table> where there's a table, and nothing else. Getting there from an official export means deleting more than you keep, so most people either do it manually or give up and paste the mess.

This site does the deleting. It reads the structure of your document and writes semantic HTML from it, throwing the presentation away rather than trying to reproduce it.

Why it runs in your browser

Most converters work by uploading your file to a server, converting it there, and giving you a download. That's a reasonable design, and it's also a design where your document sits on someone else's computer for a while. For a blog draft that's fine. For a contract, a medical record, a set of internal figures or an unpublished manuscript, it isn't.

So the conversion runs on your own machine, in JavaScript, in the tab you already have open. There is no upload step because there is nowhere to upload to. You can check this: turn off your network connection and convert something, or watch your browser's Network tab while you drop a file in.

How it actually works

When you drop a file in, your browser reads it locally and hands the bytes to a parser also running in your browser. The parser produces a structure, that structure becomes HTML, and the HTML is sanitised before you ever see it. The parsers are open-source libraries, chosen per format:

  • markdown-it parses Markdown, with the CommonMark spec plus GitHub tables, task lists and strikethrough.
  • Mammoth reads .docx. Legacy .doc is parsed by our own reader, byte by byte, since it's a pre-2007 binary format with no library that runs in a browser.
  • DOMPurify sanitises every piece of HTML that passes through — including HTML we generated ourselves, because the text inside it came from your document.
  • Papa Parse reads CSV and TSV; read-excel-file reads .xlsx workbooks.

About the safety part

A tool that outputs HTML has a duty a Markdown converter doesn't: whatever it hands you may get pasted onto a live website, where it will run. So sanitising isn't a feature here, it's the floor. Script tags, event-handler attributes, javascript: URLs, iframes, objects and embeds are removed from everything, and nothing unsanitised is ever inserted into this page's DOM.

The preview is a separate concern, and it's rendered inside a sandboxed iframe with scripts disabled and an opaque origin. That means it can't reach this page, can't read anything, and can't execute — even if the sanitiser somehow missed something. Two independent walls, because one is a single point of failure.

What it deliberately doesn't do

There are no accounts, because there's nothing to store. There's no API, because there's no server to call. There's no Google Drive connection, because that would mean asking for access to all your files and holding a token for them.

Every conversion also has real limits, and each tool page lists its own. Merged table cells split apart. Excel colours and fonts aren't reproduced. Images can't come through a Google Docs paste. Those are stated up front rather than discovered after you've converted something that mattered.

How it's paid for

The tool is free and has no paid tier. The plan is to cover hosting with advertising, which is why you may see ads on these pages in future. Ads will never be placed so as to be mistaken for a download or convert button, and they won't be injected after a conversion in a way that shifts the page under your cursor.

Advertising does not change how conversion works. Your files stay on your machine either way — that isn't a policy decision that could be reversed for revenue, it's a consequence of there being no server in the first place.

The sister site

DocsToMD does the same job in the other direction: Word, PDF, HTML, CSV and Excel into Markdown. Same approach, same privacy model, opposite output format. If you landed here wanting Markdown, that's the one you want.

Something here unclear, or something you want changed? Contact