Home › Developer Tools › HTML to Markdown Converter

HTML to Markdown Converter

Paste HTML code, or copy formatted text from a web page, Google Docs, Word or an email and paste it in. You get clean Markdown instantly, with GitHub-style tables, task lists and code blocks, plus a live preview.

Last updated:

Markdown style options
Converts automatically as you type or paste. Nothing is uploaded.
Advertisement
Advertisement

How to use the HTML to Markdown Converter

  1. Add your content. Paste HTML code into the HTML code box, upload an .html file, or switch to Rich text and paste formatted text copied from a web page, Google Docs or Word.
  2. Read the Markdown on the right. It updates as you type or paste.
  3. Adjust the style if your project has conventions: # or underlined headings, - or * bullets, fenced or indented code, inline or reference links.
  4. Check the Preview tab to see how the Markdown renders.
  5. Copy or download the result as a .md file.

HTML to Markdown cheat sheet

HTMLMarkdown
<h2>Title</h2>## Title
<strong>bold</strong>, <em>italic</em>**bold**, _italic_
<a href="https://example.com">link</a>[link](https://example.com)
<img src="a.png" alt="Logo">![Logo](a.png)
<ul><li>One</li></ul>- One
<ol><li>First</li></ol>1. First
<blockquote>Quote</blockquote>> Quote
<code>x = 1</code>`x = 1`
<pre><code class="language-js">```js fenced block
<del>old</del>~~old~~ (GitHub)
<hr>---
<br>Two spaces at the end of the line

When converting to Markdown is useful

  • Moving content from a CMS such as WordPress into a static site generator (Hugo, Jekyll, Astro, Docusaurus) that stores pages as .md files.
  • Writing documentation: turn an existing help page or a Google Doc into a README or a wiki page on GitHub or GitLab.
  • Note-taking: save web articles in Obsidian, Notion or another Markdown-based notes app with headings and links intact.
  • Prompting AI tools: Markdown is compact and keeps structure, so pasted web content uses fewer tokens than raw HTML.

To go the other way, use the Markdown to HTML converter. To build a table from scratch or from a spreadsheet, try the Markdown Table Generator.

Frequently asked questions

How do I convert a web page to Markdown?

Select the part of the page you want in your browser, copy it, and paste it into either input box. The formatting (headings, links, lists, tables, bold and italic) comes across as HTML and is converted to Markdown. You can also view the page source, copy the HTML and paste it into the HTML code box.

Can I convert Google Docs to Markdown?

Yes. Copy the text in Google Docs and paste it into the Rich text box. Headings, lists, links, tables, bold, italic and strikethrough are converted. Google Docs styling such as fonts and colours is ignored because Markdown has no equivalent.

How are HTML tables converted?

With the GitHub tables option on, simple tables become Markdown pipe tables. The first row becomes the header, and align or text-align settings become :--- , :---: or ---: alignment markers. Line breaks inside cells become <br>. Tables that contain other tables are kept as HTML because Markdown tables cannot nest.

What happens to tags Markdown does not support?

Scripts, styles and form controls are removed. Tags such as <u>, <sup>, <sub> and <iframe> are reduced to their text, or kept as raw HTML if you tick the option to keep them, since most Markdown renderers accept inline HTML.

Which Markdown flavour is produced?

CommonMark-compatible Markdown, plus GitHub Flavored Markdown extensions (tables, task lists and ~~strikethrough~~) when the GitHub option is on. Special characters such as * and _ in normal text are escaped so they are not misread as formatting.

Is my HTML sent to a server?

No. The conversion runs entirely in your browser using its built-in HTML parser. Scripts in the pasted HTML are never run.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Markdown to HTMLConvert Markdown to clean HTML with a live editor.Markdown Table GeneratorBuild Markdown tables in a grid or paste from Excel/CSV, with alignment and preview.Markdown EditorWrite Markdown with a toolbar, live split preview, autosave and .md or HTML export.HTML FormatterBeautify and indent HTML code with a live preview.CSS Selector TesterTest CSS selectors on your HTML: highlighted matches, match count and specificity.CSV to Markdown TableConvert CSV to a neatly aligned GitHub Markdown table with column alignment and live preview.FAQ Schema GeneratorTurn questions and answers into FAQPage JSON-LD markup with validation and a preview.HTML Table to CSVExtract any table from HTML or page source to CSV, TSV or JSON, with colspan and rowspan handled.JSON to Excel ConverterTurn JSON into a styled .xlsx spreadsheet; nested arrays become their own linked sheets.JSON to CSVConvert JSON data to CSV for spreadsheets.CSV to JSONConvert CSV data to JSON with live preview.Excel to CSVConvert XLSX spreadsheets to CSV.CSV ViewerOpen a CSV or TSV file as a sortable, filterable table.Excel Viewer (XLSX / XLS)Open XLSX, XLS and ODS spreadsheets in your browser without Excel.Line Ending ConverterConvert text and files between CRLF, LF and CR line endings.XML to JSONConvert XML to JSON with validation.Text Encoding ConverterDetect and convert text file encodings like UTF-8, UTF-16 and Latin-1.JSON ViewerExplore JSON as a collapsible tree, search keys and values and copy any node's path.TTF to WOFF2 ConverterConvert TTF and OTF fonts to WOFF2 or WOFF and get a ready @font-face CSS snippet.Chmod CalculatorConvert Linux file permissions between checkboxes, octal (755) and symbolic (rwxr-xr-x) notation.JSON to TypeScriptGenerate TypeScript interfaces or types from JSON, with nested types and optional fields.Morse Code TranslatorTranslate text to Morse code and back, then play it as sound or a blinking light, or save a WAV.HTML Table GeneratorBuild HTML tables in an editable grid with styles, header rows, CSV import and live preview.Hex to Text ConverterConvert hex to text and text to hex with UTF-8 support and space, 0x, \x or comma formats.JSON to XML ConverterConvert JSON to well-formed XML with attributes, arrays and pretty print.JSON to YAML ConverterConvert JSON to clean YAML as you type, with indent, quoting and sort options.YAML to JSON ConverterConvert YAML to pretty or minified JSON, with errors pinned to the exact line.JSON ValidatorCheck JSON with the exact line and column of each error, fix tips and one-click auto-fix.Image to Base64Convert images to Base64 data URIs, CSS backgrounds and HTML img tags in your browser.Base64 to ImagePaste a Base64 string or data URI to preview, identify and download the image.JSON CompareCompare two JSON documents and see every added, removed and changed path.Hex to DecimalConvert hex to decimal instantly with steps and signed mode.Decimal to HexConvert decimal to hex instantly with steps and signed mode.Binary to DecimalConvert binary to decimal instantly with steps and signed mode.Decimal to BinaryConvert decimal to binary instantly with steps and signed mode.Two's Complement CalculatorDecimal to two's complement binary and back for 4-64 bits, with invert-and-add-1 steps.XML to CSV ConverterConvert XML to CSV: detects repeating records, flattens nested data, pick your columns.CSV to XML ConverterConvert CSV to well-formed XML with custom root and row names, escaping and pretty print.Code to ImageTurn code into a beautiful syntax-highlighted PNG with themes, window frame and background.Excel to JSON ConverterConvert Excel sheets (XLSX, XLS, ODS) to JSON with header row, type and shape options.CSV to Excel ConverterConvert CSV files to a real .xlsx workbook with typed numbers and dates, one sheet per file.CSV SplitterSplit a large CSV into smaller files by row count, file count or column value, header kept.CSV MergerCombine many CSV files into one, matching columns by name, with dedupe and a source column.VCF to CSV ConverterConvert vCard (.vcf) contacts to CSV for Google or Outlook, or turn a CSV back into a VCF.Calendar Event (.ics) GeneratorCreate an .ics calendar invite with time zone, reminders and repeats + Google/Outlook links.CSV Column ExtractorPick, reorder and rename CSV columns, filter rows by value, and export a new CSV or JSON.CSV Diff CheckerCompare two CSV files by key column and see added, removed and changed rows cell by cell.CSV Duplicate Row RemoverRemove duplicate rows from a CSV by all or selected columns and download the cleaned file.CSV to HTML TableTurn CSV into clean HTML table code with a live preview, styling options and one-click copy.CSV TransposeSwap rows and columns of CSV, TSV or pasted spreadsheet data, with delimiter auto-detect.Date Format ConverterConvert any date to ISO 8601, RFC 2822, Unix time and custom strftime, moment or Java patterns.ENV to JSON ConverterConvert .env files to JSON or YAML and JSON back to .env, with quotes and multiline values.File to Base64Convert any file to a Base64 string or data URI with MIME detection, line wrap and download.IEEE 754 Floating Point ConverterConvert decimals to 32/64-bit IEEE 754 floats: toggle bits, see hex, exact value and rounding error.INI to JSON ConverterConvert INI and CFG files to JSON and JSON back to INI, with sections, arrays and types.IP Address ConverterConvert IPv4 to decimal, hex, binary, octal and back, with class and private/public check.ISBN Converter & ValidatorConvert ISBN-10 to ISBN-13 and back, validate check digits and hyphenate, one or in bulk.JSON Flatten / UnflattenFlatten nested JSON to dot or bracket path keys, or unflatten flat keys back to nested JSON.JSON to Dart ClassTurn JSON into Dart model classes with fromJson, toJson, null safety and nested classes.JSON to Java ClassTurn JSON into Java POJOs or records with Lombok, getters/setters and Jackson or Gson annotations.JSON to Kotlin Data ClassTurn JSON into Kotlin data classes for kotlinx.serialization, Gson, Moshi or Jackson.JSON to Markdown TableTurn a JSON array of objects into a GitHub Markdown table with column picker and alignment.JSON to PHP ArrayConvert JSON to PHP array code (short [] or array()) and PHP arrays back to JSON.JSON to Rust StructTurn JSON into Rust structs with serde derives, rename attributes, Option and Vec types.JSON to SQL ConverterConvert a JSON array of objects to CREATE TABLE and INSERT statements for MySQL, Postgres, SQLite.JSON to Swift StructTurn JSON into Swift Codable structs with CodingKeys, optionals and nested types.JSON to TOML ConverterConvert JSON to clean TOML with tables, arrays of tables, inline tables and dates.JSONL to JSON ConverterConvert JSON Lines / NDJSON to a JSON array and back, with line-level error reports.
See all 129 Data & File Format Converters →