How to convert rich text to markdown
When you copy formatted text, your clipboard holds more than the words. It also holds an HTML version, with the headings, bold text, lists, tables and links of the original. This tool reads that HTML and writes markdown from it. That is how a rich text to markdown converter can keep the structure: it does not guess from the plain text, it reads the formatting that was copied.
The built-in example is a short paste in the style Google Docs produces. It is 2,534 characters of HTML, most of it font and color settings on 13 style wrappers, and it comes out as 48 words of markdown: one heading, a numbered list, a table and a link.
## Meeting recap
Thanks for joining. Here is what we **agreed** on, with the [full notes](https://example.com/notes) linked below.
1. Launch the beta on *Monday*
2. Keep the price at $9 per month
| Task | Owner |
| --- | --- |
| Release notes | Sam |Google Docs to markdown
Select the part you want in Google Docs, or press Ctrl+A for the whole document, copy it, and paste it here. Google Docs wraps every piece of text in a span that carries a font, size and color, and it wraps the whole copy in a bold tag that is switched off. The tool ignores that clutter, and reads real bold and italic from the style settings instead. A heading in your document comes out as a line starting with hash signs.
To convert a saved file instead of a copied selection, use Word to Markdown on a .docx you download from Docs.
Word, web pages and email
- Word: lists copied from Word are stored as ordinary paragraphs with hidden markers. The tool rebuilds them as real bulleted and numbered lists, with nesting.
- Web pages: scripts, styles and hidden parts are dropped. Headings, lists, tables, code blocks, quotes and links are kept, and a checkbox list becomes a markdown task list.
- Email: formatted messages from Gmail or Outlook paste as HTML too, so the same rules apply.
- Plain text: if the clipboard has no formatting, the text is split into paragraphs on blank lines.
- HTML source: if you paste HTML code as text, for example from a page's source, the tool reads it as HTML.
What the cleanup note tells you
Above the output, a note lists what was cleaned or lost. It counts the style wrappers removed, Word lists rebuilt, tables converted and merged cells that had to be split. It also counts images: a picture on the web is kept as a markdown image with its address. A picture that only lives on your computer, or inside the document, has no address to point to. It gets a placeholder file name such as image-1.png, so you can see where it was and add the file yourself.
Colors, fonts, sizes, underline and alignment are not part of markdown, and they are dropped on purpose.
Options for the markdown style
- List marker: a dash, a star or a plus for bullets.
- Italic style:
*italic*or_italic_. - Headings: hash signs for every level, or underlines for the first two levels.
- Keep links: off, every link is replaced by its text.
- Keep images: off, only the alt text of each picture is kept.
The reverse direction is Markdown to Rich Text, which turns markdown into text you can paste formatted. Tables from web pages have their own tool in HTML Table to Markdown, and Remove HTML Tags strips the tags from markup you only need as text.
Limits
- Only what your clipboard carries can be read. If the paste is plain text, there is no formatting to find.
- Some apps copy less formatting than they show. If a heading comes out as a normal line, the app did not mark it as a heading.
- Headings are found from heading tags. A line that was only made large and bold stays a paragraph, apart from bold.
- Tables with merged cells are split into separate cells, and a table inside a table is flattened to text.
- The tool does not fetch web addresses. Paste the content, not the link.
The paste is read in your browser. It is not uploaded or stored, and scripts in pasted content are never run. See the Privacy Policy for details.