Free HTML, JSON & XML to Markdown Converter

Turn raw HTML pages, structured XML files, and minified JSON payloads into clean, readable Markdown locally in your browser.

How Local HTML / JSON / XML Conversion Works

Uses the browser DOMParser to walk HTML trees while discarding <script>, <style>, <link>, and <meta> tags; walks XML hierarchy into nested Markdown headings and bold leaf nodes; and pretty-prints JSON into fenced syntax-highlighted blocks.

Raw HTML pages are often 80%+ markup, inline scripts, and CSS classes. Stripping non-content tags before prompting an LLM cuts token usage dramatically and eliminates noise from RAG embeddings.

Key Capabilities

  • Strips Scripts, Styles & Noise: Automatically drops script, style, meta, and link elements from saved HTML files while preserving semantic headings, code blocks, links, and tables.
  • Hierarchical XML Mapping: Turns nested XML tags into readable Markdown headings and key-value bullets instead of raw angle-bracket walls.
  • Pretty-Printed JSON Fencing: Validates and formats minified JSON into indented fenced code blocks ready for documentation or LLM inspection.
  • Want 1-Click Live Webpage Capture?: Pair this tool with the MarkItDown Companion Extension to export live web pages and AI chat threads without saving HTML files first.

How to Convert HTML / JSON / XML to Markdown

  1. Drop your HTML, XML, or JSON file: Select .html, .htm, .xml, .json, .txt, or .md files from your computer.
  2. Sanitize and structure locally: DOMParser strips boilerplate tags and converts structure to GitHub Flavored Markdown offline.
  3. Copy or download clean Markdown: Download the .md output or paste straight into ChatGPT, Claude, or your documentation repo.

Example Output (api-docs.html (320 KB))

# api-docs

## Authentication

Send a Bearer token in the `Authorization` header on every request.

| Header | Required | Purpose |
| --- | --- | --- |
| Authorization | Yes | Scoped session token |
| Content-Type | Yes | application/json |

Offline Desktop & More Converters

Need to convert live browser tabs or AI chats in one click? Install the free MarkItDown Companion browser extension. Download MarkItDown for Windows or read the Supported Formats documentation.

Frequently Asked Questions

Does HTML to Markdown remove script and style tags automatically?

Yes. Script, style, link, and meta elements are stripped automatically so only readable content, headings, links, code blocks, and tables remain.

How are XML and JSON files formatted?

XML trees are walked recursively into headings and bold field labels, while JSON is pretty-printed inside a fenced json code block.

Can I capture a live webpage without downloading an HTML file?

Yes. Install the MarkItDown Companion browser extension for Chrome, Firefox, or Edge to capture active pages and AI conversations directly.