What does Paste as Markdown do?
When you copy from a web page, a Word document or Google Docs, the clipboard carries the text twice: as plain text and as HTML with the formatting. A normal text box keeps only the first, so headings, bold, lists and tables are lost. This tool reads both. It takes the HTML that comes with the paste, converts it to clean Markdown, and falls back to the plain text only when no formatting came along.
Before anything is converted, the HTML is sanitised: scripts, style blocks, frames, event attributes such as onclick and unsafe links such as javascript: are removed. Only content tags and a short list of attributes survive. The result is shown in three places side by side: what you pasted, the Markdown, and a rendered preview of that Markdown, so you can see right away whether the structure survived.
The converter knows the habits of the programs that produce clipboard HTML. Google Docs wraps the whole document in a bold tag whose weight is normal, writes bold and italics as styles on spans and places nested lists oddly; Word writes a list as a run of paragraphs with the bullet or number as text; code editors copy code as a monospaced block with one line per element. All of these are turned into proper Markdown: headings, bold, italics, strike-through, nested lists, tables with column alignment, task lists with [x] and [ ], code blocks and links.
For text that has no formatting at all, such as an e-mail or notes, Text to Markdown applies heuristics for headings, lists and tables. If you already have HTML source rather than a clipboard, use HTML to Markdown. To go the other way and see how Markdown renders, use Markdown to HTML.
How to use it
- Copy something formatted: a section of a web page, a few paragraphs from Word or Google Docs, a table from a spreadsheet.
- Click the paste area and press Ctrl+V (Cmd+V on a Mac). You can also press it anywhere on the page, or use the Paste button, which asks the browser for permission to read the clipboard. The page opens with an example already pasted.
- Read the Markdown in the middle and the preview on the right. The status line tells you whether the formatted content was read or only plain text.
- Adjust the options: headings with
#or underlined, the bullet character, fenced or indented code, inline or reference links, and what to do with images. - Copy the Markdown or download it as a
.mdfile.
Examples
A paragraph from Google Docs
Google Docs does not write <strong> for bold text. It writes a span with font-weight:700, and it wraps the whole page in a <b> tag whose weight is normal. A naive converter turns the entire document bold. Here the wrapper is ignored and runs are merged:
This is **very important** and *slanted* and ~~dropped~~ with a [link](https://example.com).A list from Word
Word copies a list as paragraphs of the class MsoListParagraph, with the bullet as text in a span marked to be ignored, and the level in a style. The tool rebuilds real lists and removes the bullet characters:
- Apples
- Green ones
- Pears
1. Open the file
2. Save itA table from a web page
Alignment comes from the align attribute or the text-align style of the cells, bold or links inside cells are kept, a pipe in a cell is escaped and a line break becomes a br tag. A table with no header row gets its first row as the header, because Markdown tables need one.
| Plan | Seats |
| :--- | ---: |
| Team | 10 |
| Business | 100 |Code copied from an editor
Editors copy code as a monospaced block with white-space preserved and one element per line. The tool detects that and returns a fenced block, with the language when the page marks it, for example language-js.
Common mistakes
- Copying from a plain-text source. A text editor or a terminal puts only plain text on the clipboard, so there is nothing to convert. The tool then applies the rules of Text to Markdown and says so in the status line.
- Expecting embedded images to survive. An image that exists only inside the clipboard is a data URL, millions of characters that cannot live in a readable Markdown file. It is kept as
![description]()so you know where it was. Images that point to a web address keep their link. - Pasting into a different field. The page listens for paste events on the page itself. If the cursor is in the search box or another text field, the paste goes there instead.
- Expecting colours, fonts and sizes. Markdown has none. They are dropped on purpose.
- Blocked clipboard access. The Paste button needs permission. If the browser refuses, click the paste area and use the keyboard shortcut, which does not need it.
Frequently asked questions
Is what I paste sent to a server?
No. The clipboard content is read, sanitised and converted entirely in your browser. It is kept in memory only; nothing you paste is stored or put in the address.
Is it safe to paste HTML from an unknown page?
The HTML is sanitised before it is converted or shown: scripts, style blocks, frames, event handlers and unsafe links are removed. The preview is sanitised again after the Markdown is rendered.
Why are my underlines, colours and fonts gone?
Markdown describes structure, not appearance. Underline, colour, font and size have no equivalent, so they are not carried over. Bold, italics, strike-through, links, headings, lists, tables and code are.
Which Markdown flavour does it write?
GitHub-flavoured Markdown: pipe tables, ~~strike~~ and task lists. Headings and lists can use the other styles from the options bar.
How do I fix a table after pasting it?
Copy the Markdown table into the Markdown table generator, which opens it in an editable grid.