Convertidor de HTML a Markdown

Pega código HTML y conviértelo a Markdown al instante en tu navegador. Conserva títulos, listas, enlaces, imágenes, código y tablas.

Quita navegación, cabeceras, pies, barras laterales y anuncios.

Si se desactiva, solo queda el texto.

Mantiene la sintaxis ![alt](src).

Se usa para convertir imágenes y enlaces relativos en direcciones completas. Si el HTML incluye <base>, canonical u og:url, se detecta automáticamente.

727 caracteres

221 caracteres · 15 líneas

La conversión se ejecuta en tu navegador. El HTML no se envía a ningún servidor.

1. Pure HTML to Markdown Conversion

Your pasted HTML is parsed with the browser's native DOMParser, sanitized to remove scripts, tracking pixels, forms, and decorative wrappers, then mapped into standard GitHub-Flavored Markdown (GFM). Every HTML element translates directly to its canonical Markdown counterpart without paraphrasing or AI rewriting.

2. Intelligent Main Content Extraction

When converting a full website HTML page or CMS export, toggle “Extract main content only”. The parser isolates the primary article container (<article>, <main>) and purges navigation headers, sidebars, cookie consent dialogs, and footer boilerplate before serialization.

Fidelity & Formatting

Preserving Complex Tables, Code Fences, and Nested Lists

When converting rich HTML from technical blogs and documentation into Markdown, formatting often breaks if tools rely on fragile regular expressions. Our AST-driven converter preserves structural fidelity across complex webpage layouts:

GFM Pipe Tables

Maps HTML <table> tags into clean GFM pipe tables. Cell line breaks are normalized into spaces, inner pipe characters are escaped as \|, and header alignment is preserved.

Fenced Code Blocks

Extracts syntax tags from class="language-*" classes on <pre><code> blocks, preserves indentation, strips line-number gutter tables, and escapes HTML entities accurately.

Nested List Hierarchies

Maintains strict 2-space indentation for multi-level nested unordered (- ) and ordered (1. ) lists, preventing CommonMark parsers from collapsing sub-items into paragraphs.

Workflow Comparison

Pasted HTML vs. Automated Website to Markdown URL Conversion

Depending on your source document and authentication requirements, you can choose between pasting raw HTML directly into this tool or submitting a live URL to our automated converter:

Use Case & RequirementDirect HTML to MarkdownURL Website to Markdown
Best ForDevTools Inspect Element outerHTML, email templates, private intranets, paywalled pagesPublic articles, documentation portals, whole-site sitemaps, and bulk crawls
Privacy & Execution100% Client-Side: No data leaves your local browser sandboxServer-side headless fetch with optional cloud JavaScript rendering
Image & Link HandlingNormalizes relative paths when a source URL or <base> tag is providedFully resolves absolute image CDN links and author canonical URLs automatically
Batch & Multi-PageSingle document paste and immediate copy/downloadMulti-URL lists and recursive sitemap crawling with ZIP archive bundling
SSG & Blog Migration

Migrating Website Content into Static Site Generators (Astro, Hugo, Next.js)

If you are converting articles from legacy CMS platforms (WordPress, Medium, Drupal) into modern Markdown-powered static site generators, ensure your conversion follows these five critical engineering requirements:

Strict Heading Hierarchy

Ensure exactly one top-level title (frontmatter or single # Title), with sub-sections starting at ## Section to avoid duplicate H1 warnings in SEO audits.

Asset & Image Normalization

Resolve relative src="/img.png" paths to absolute origin URLs so images load properly when moved to local content folders.

Clean GFM Syntax without Void Tags

Strip unclosed HTML tags (<br>, <img>) that cause MDX, Contentlayer, and Babel JSX compilers to fail during site builds.

Kebab-Case File Naming Standards

Save exported articles as lowercase kebab-case files (e.g. 2026-11-20-article-slug.md) to maintain clean URL slugs across static routes.

HTML to Markdown Frequently Asked Questions

Technical insights and best practices for converting website HTML into clean Markdown.

How can I convert a public webpage URL into a clean Markdown (.md) file that preserves headings, images, links, and code blocks?

You can either paste your webpage HTML directly into this tool or use our live URL to Markdown converter. The conversion runs a 4-step AST pipeline: (1) Headless HTML retrieval with DOM hydration; (2) Boilerplate pruning of navbars, footers, scripts, and cookie banners; (3) AST transformation mapping headings to ATX #, links to [text](url), images to ![alt](src), and tables to GFM pipes; and (4) Serialization into clean, downloadable .md text.

What are the pros and cons of using an automated "URL to MD" converter versus manually scraping and writing Markdown?

Automated website to Markdown converters process full pages in under 2 seconds, remove presentation boilerplate automatically, preserve tables and code blocks with zero manual effort, and scale to thousands of URLs. In contrast, manual scraping or writing takes 15–45 minutes per article, introduces formatting inconsistencies, and requires continuous maintenance when website DOM structures change. Automated conversion is exponentially more efficient for AI prompt context, RAG vector pipelines, and technical archives.

How do I convert HTML copied from browser Developer Tools (Inspect Element) into Markdown?

In Google Chrome, Firefox, or Safari, right-click the main content container and choose Inspect. Locate the <article> or <main> node in the Elements panel, right-click it, and select Copy > Copy outerHTML. Paste that HTML directly into the editor above. The converter instantly generates clean Markdown while stripping any residual script or style noise.

When converting a complex webpage (tables, nested lists, embedded code samples) to Markdown I lose formatting—what steps or settings reliably preserve tables and code blocks?

Formatting loss usually occurs when tools use simple string replacements instead of a true DOM-based Abstract Syntax Tree (AST) parser. To reliably preserve formatting: (1) use an AST parser that maps <table> elements to GitHub-Flavored Markdown pipe tables while escaping inner pipe characters; (2) enforce consistent 2-space indentation on nested lists; (3) detect syntax language classes (such as class="language-typescript") and preserve them on fenced code blocks (```ts); and (4) isolate the target body content with a container selector (like article or .content) to avoid interference from surrounding layout wrappers.

What features should I look for in a website-to-Markdown converter if I need to import pages into a static site generator for my blog?

When migrating website pages into static site generators like Astro, Hugo, Next.js, or VitePress, ensure your converter provides: (1) Structured YAML frontmatter with metadata (title, date, description, tags, canonical URL); (2) Relative asset and image URL normalization; (3) Clean GFM syntax without unclosed void tags that cause JSX build crashes; (4) Strict heading hierarchy starting at H2; and (5) Deterministic kebab-case file naming matching your route architecture.

Is it possible to supply a link and immediately get an .md file of any public webpage? What limitations and copyright rules apply?

Yes, any publicly accessible, unauthenticated webpage can be converted to an .md file in seconds. However, consider three constraints: (1) Technical Boundaries: Paywalls, login sessions, and aggressive bot-blocking captchas cannot be fetched via URL (use pasted outerHTML in this tool instead); (2) File Naming Standards: Use lowercase kebab-case filenames (e.g. 2026-11-20-article-slug.md), stripping illegal filesystem characters; and (3) Copyright & Licensing: Respect source site robots.txt crawl directives, retain author and canonical source URL metadata, and ensure extracted content is used in compliance with fair use, research, or internal AI indexing rather than unauthorized republication.

Need to convert live website URLs instead?

Explore single URL conversion or batch whole-site crawling with bundled ZIP exports.

After converting, estimate the Markdown token count.