HTML to Markdown converter
Paste HTML code or rich text from a web page, Google Docs or Word and get clean Markdown. Free, no sign-up, and everything runs in your browser.
Paste HTML code, or copy formatted text from a web page, Google Docs or Word and paste it here. The Markdown updates as you type.
Headings
Bullets
Links
Markdown
Paste some HTML above to see the Markdown.
What this HTML to Markdown converter does
This tool turns HTML into clean Markdown that you can paste into a README, a docs site, a notes app or a launch post. It reads headings, paragraphs, bold and italic text, links, images, lists (nested and numbered), quotes, code blocks with their language, tables, task lists and strikethrough, and writes each one in GitHub-flavored Markdown.
You can paste HTML code, or copy formatted text straight from a web page, Google Docs or Word. When you paste, the tool reads the formatted version from your clipboard instead of the plain text, so headings, links and bold text survive the trip.
It runs in your browser tab. The browser parses your HTML into a separate, in-memory document1, and because that document has no browsing context, scripting is disabled in it.2 Scripts in the pasted HTML never run, images are not loaded, and nothing is uploaded.
How to convert HTML to Markdown
- Paste HTML or rich text into the box. The Markdown updates as you type.
- Pick the style you want:
# Headingor underlined headings, the bullet character (-,*or+), and inline links or reference links. Reference links keep long URLs out of your sentences and list them at the end. - Switch to Preview to check the result as rendered Markdown. The preview shows images as placeholders, so it doesn't request anything from other sites.
- Select Copy Markdown, or Download .md to save a file.
What changes when HTML becomes Markdown
Markdown covers only a small part of HTML. Its creator describes it as a writing format, not a replacement for HTML, and says to use HTML itself for anything the syntax doesn't cover.3 So some things can't come across one to one:
- Styling is dropped. Colors, fonts, classes and layout have no Markdown form. Bold, italic and strikethrough that Google Docs writes as inline styles are kept as
**,*and~~. - Tables are simplified. A GitHub-flavored Markdown table has one header row, a delimiter row and data rows, and block-level elements can't go inside it.4 The tool joins line breaks in a cell with
<br>, flattens nested tables, and adds empty cells where a cell spans several columns. It tells you when that happens. - Some tags stay as HTML.
<sup>,<sub>and<kbd>have no Markdown syntax, so they are kept as tags, which Markdown allows.3 - Scripts, styles, forms and embeds are removed. They aren't readable text.
Characters that Markdown would read as formatting, such as *, _, [ or a # at the start of a line, are escaped with a backslash. CommonMark lets any ASCII punctuation character be escaped this way, so the text shows exactly as it did in the HTML.5 A line break inside a paragraph becomes a backslash at the end of the line, which CommonMark reads as a hard line break.5
If you are turning an old landing page into a README or reusing copy from your site for a product launch post, convert it here, then compare it with your edited version in the diff checker.
More free tools
PX to REM converter
PX to REM converter that runs in your browser. Convert px to rem and rem to px at any root font size, or convert a whole stylesheet at once.
ASCII table and converter
ASCII table with all 128 codes in decimal, hex, octal and binary, plus a converter from text to ASCII codes and back. Runs in your browser.
Keycode finder
Keycode finder that runs in your browser. Press any key to see its JavaScript keyCode, key, code and location, and copy a ready keydown handler.
Image converter
Image converter that runs in your browser. Convert PNG, JPG, WebP, AVIF, GIF and SVG files in bulk, with quality and resize options. No uploads.
Test credit card numbers generator
Test credit card numbers for form and checkout tests, made in your browser. Generate valid-format numbers for 7 card networks and check any number.
Random string generator
Random string generator that runs in your browser. Make secure random strings, API keys and tokens with your own length, characters and prefix.
Frequently asked questions
Sources
MDN Web Docs: DOMParser: parseFromString() method
WHATWG: HTML Standard, dynamic markup insertion (DOMParser)
John Gruber, Daring Fireball: Markdown syntax documentation
GitHub: GitHub Flavored Markdown Spec
CommonMark: CommonMark Spec, version 0.31.2