HTML to Markdown
Turn HTML source into readable Markdown for documentation and publishing. Conversion happens locally, with explicit notes about removed content and destinations.
Convert HTML in three steps
- Paste HTML source or load one UTF-8 file up to 1 MiB. This tool reads markup as text; it does not open a website or fetch its images.
- Select Convert to Markdown. The tool keeps supported body structure, applies its destination policy and reports meaningful changes. CSS, page layout and interactive behavior are not reproduced.
- Review the Markdown and conversion notes, then copy the text or download converted.md. Check the result in your intended Markdown platform before publishing.
Understand the structural conversion
Headings, paragraphs, emphasis, lists, blockquotes, code, permitted links and images, and simple tables have Markdown equivalents. Styling, dimensions, event handlers and source attributes generally do not. The output is Markdown source, not a screenshot or a live page.
Relative destinations are preserved without guessing a website. A link such as ../guide still needs the right document location. Supplied base elements are ignored, and fragment targets can differ between Markdown platforms.
Scripts, comments and unsupported embedded content are removed. Links outside the destination policy retain their label; rejected images retain their alt text where available. Conversion notes explain these changes rather than promising perfect preservation.
This is not a rendered-visibility extractor or redaction tool. Source text hidden by CSS or attributes can appear in Markdown. Review the complete output, especially when converting content intended for publication.
Examples of retained structure and changes
An h1 containing Guide becomes an ATX heading, while a paragraph with strong text becomes a paragraph using Markdown emphasis markers. HTML entities are decoded by the HTML parser; ordinary Unicode text is retained.
A simple table without a header receives an empty header row so its original first row remains data. Merged or nested tables are rejected rather than expanded into an unreliable layout.
A rejected script destination is not copied as a link. Its readable label remains. A relative image path can remain as Markdown image syntax, but the image is never fetched or embedded by this converter.
Limits and compatibility
Input is limited to 1 MiB of UTF-8 and 1,048,576 UTF-16 code units. Local files must be valid UTF-8; other encodings are not guessed. Output and structural limits prevent partial or silently truncated documents.
Simple tables allow up to 100 columns, 1,000 rows including a header, and 10,000 padded cells across the conversion. Row or column spans, nested tables and complex cell blocks are unsupported. Reversed or reset ordered-list numbering is also rejected.
The output uses a fixed CommonMark-based profile with supported GFM tables, strikethrough and task items. HTML repairs and whitespace normalization can change source formatting; code extraction is not byte-identical file recovery.
Allowed links and images are text references, not verified destinations. No raw HTML output or rendered preview is offered, but this converter is not a universal sanitizer for every downstream Markdown renderer or custom decoder.
Local input and current exports
This tool does not upload or store your HTML, filenames or Markdown. It does not request URLs from the source. Editing, cancelling or clearing retires the previous result and its export actions. The site's general privacy policy still applies.
HTML to Markdown questions
Sources and format references
- github.comhast-util-to-mdast 10.1.2The pinned AST engine parses HTML and serializes the specified Markdown profile; see its bundled third-party notices.
- Third-party notices
- spec.commonmark.orgCommonMark 0.31.2CommonMark describes the underlying Markdown syntax.
- github.github.comGitHub Flavored MarkdownGitHub Flavored Markdown describes extensions, including tables, strikethrough and task items; this tool does not implement all GFM features.
- html.spec.whatwg.orgHTML StandardThe HTML Standard describes parsing and document structure. This tool converts source rather than a rendered page.
- url.spec.whatwg.orgURL StandardThe URL Standard informs destination handling; relative references remain relative and destinations are not verified.
- encoding.spec.whatwg.orgEncoding StandardThe Encoding Standard describes UTF-8 decoding.
References reviewed 6 November 2026.
Related tools
JSON to YAML
Convert JSON to YAML locally while preserving number text and quoted strings; copy or download the complete result.
Open tool — JSON to YAMLYAML to JSON
Convert one YAML document locally to JSON with exact number text and bounded aliases, then copy or download the complete result.
Open tool — YAML to JSONJavaScript Regex Tester
Test a JavaScript pattern locally and inspect matches, captures, and UTF-16 positions.
Open tool — JavaScript Regex TesterMarkdown to HTML
Convert a Markdown draft to an HTML fragment, inspect the source and inert preview, then copy or download it.
Open tool — Markdown to HTMLText Sorter
Sort lines alphabetically by a chosen language or by Unicode code point, keeping duplicates, blank rows and complete line contents.
Open tool — Text SorterRemove Duplicate Lines
Keep the first copy of each exact text line, preserving order, significant spaces and blank rows, then copy or download the result.
Open tool — Remove Duplicate LinesText Diff Checker
Compare two drafts locally, with exact whole-line changes, visible whitespace rules and clear final-newline handling.
Open tool — Text Diff CheckerCase Converter
Convert text to uppercase, lowercase, capitalized words or sentence case with explicit letter rules.
Open tool — Case ConverterHTML Entity Encoder/Decoder
Encode or decode literal HTML references with explicit context, Unicode options and LF output, without parsing or rendering markup.
Open tool — HTML Entity Encoder/DecoderMarkdown Table Generator
Edit a small literal-text table, set alignment and copy GFM Markdown or import tab-separated text.
Open tool — Markdown Table GeneratorQuery String Parser & Builder
Edit ordered URL parameters, retain repeated names and copy a normalized query or HTTP(S) URL.
Open tool — Query String Parser & BuilderURL Encoder & Decoder
Convert a UTF-8 URL component or form value with explicit space and plus rules, then copy or download the result.
Open tool — URL Encoder & DecoderBase64 Encoder & Decoder
Encode UTF-8 text as standard or URL-safe Base64, or decode either format with clear errors and complete text output.
Open tool — Base64 Encoder & DecoderXML Formatter
Check namespace-aware XML 1.0, format or compact locally, and copy or download UTF-8 output.
Open tool — XML FormatterJSON Formatter & Validator
Check JSON syntax, format or minify locally, and copy or download output while preserving original data tokens.
Open tool — JSON Formatter & ValidatorSMS Character Counter & Segment Calculator
See how your message is encoded, where its segments end and what it may cost. Your text stays in your browser.
Open tool — SMS Character Counter & Segment CalculatorSocial Media Character Counter
Check platform-specific limits and split posts without losing text.
Open tool — Social Media Character CounterCharacter Counter
Count characters, words, sentences and paragraphs. Check word density, reading time and UTF-8 size, all in your browser.
Open tool — Character CounterText Size Calculator
Compare text encodings and payload sizes in your browser.
Open tool — Text Size CalculatorPDF Text Cleaner
Fix line breaks and spacing in text copied from a PDF. Preserve your original and review ambiguous hyphens before copying the cleaned text.
Open tool — PDF Text CleanerFancy Text Converter
Convert supported fancy Unicode letters to normal text locally. Keep case, accents, emoji and your original text.
Open tool — Fancy Text ConverterGarbled Text Fixer
Fix garbled text and repair broken accents with a browser-based mojibake fixer. Review each possible UTF-8 reversal before applying it.
Open tool — Garbled Text FixerGmail Clipping Checker
Measure email HTML bytes in UTF-8, compare them with an advisory 102,000-byte Gmail reference, and inspect size contributors locally.
Open tool — Gmail Clipping Checker