${preview.innerHTML}

About This Tool

Write Markdown with a live preview side by side. Supports GitHub Flavored Markdown including tables, task lists, and code blocks with syntax highlighting. Export to HTML or copy formatted text.

How to Use

  1. Type or paste Markdown in the left editor panel.
  2. See the formatted preview update in real-time on the right.
  3. Export as HTML or copy the formatted output.

Frequently Asked Questions

What is Markdown and why should I use it?

Markdown is a lightweight markup language for formatting text with simple symbols. It's used on GitHub, Reddit, and many CMS platforms because it's faster than HTML.

How do I make a table in Markdown?

Use pipes (|) to separate columns and hyphens (-) for the header row: | Col 1 | Col 2 | then | --- | --- | then your data rows.

`; const blob = new Blob([html], { type: 'text/html' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'document.html'; a.click(); URL.revokeObjectURL(url); } // Download as Markdown function downloadMarkdown() { const blob = new Blob([editor.value], { type: 'text/markdown' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'document.md'; a.click(); URL.revokeObjectURL(url); } // Copy HTML to clipboard function copyHTML() { const html = preview.innerHTML; navigator.clipboard.writeText(html).then(() => { const btn = event.target; const original = btn.textContent; btn.textContent = '✓ Copied!'; setTimeout(() => { btn.textContent = original; }, 2000); }); } // Clear editor function clearEditor() { if (confirm('Clear all content? This cannot be undone.')) { editor.value = ''; preview.innerHTML = ''; localStorage.removeItem('markdown-editor-content'); } } // Initialize preview preview.innerHTML = parseMarkdown(editor.value);