Markdown Editor

Write Markdown on the left, see a live preview on the right. Export to HTML or download your work.

Markdown Draft saved
Preview Live

Your preview will appear here as you type...

Words: 0 Characters: 0 Lines: 1 Read time: 0 min

Get All 40+ Tools

Lifetime Pass ($99.99) gets every tool we build. Or resell them all under your brand from $99.

Visit the Store
SPUNK.CODES

Get Free Dev Tools Weekly

Join developers getting new tools, tips, and resources every week.

No spam. Unsubscribe anytime.

\n`; downloadFile(html, 'markdown-export.html', 'text/html'); gtag('event', 'export_markdown', { event_category: 'tool_use', event_label: 'download_html' }); } function downloadMarkdown() { const md = editor.value; if (!md.trim()) { showToast('Nothing to download'); return; } downloadFile(md, 'document.md', 'text/markdown'); gtag('event', 'export_markdown', { event_category: 'tool_use', event_label: 'download_md' }); } function downloadFile(content, filename, type) { const blob = new Blob([content], { type: type }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = filename; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); showToast('Downloaded ' + filename); } function clearEditor() { if (editor.value.trim() && !confirm('Clear all content? This cannot be undone.')) return; editor.value = ''; preview.innerHTML = '

Your preview will appear here as you type...

'; updateStats(); localStorage.removeItem('md_editor_draft'); showToast('Editor cleared'); } // Toast notification function showToast(msg) { const toast = document.getElementById('toast'); toast.textContent = msg; toast.classList.add('show'); setTimeout(() => toast.classList.remove('show'), 2500); } // localStorage autosave every 5 seconds autosaveTimer = setInterval(() => { if (editor.value.trim()) { localStorage.setItem('md_editor_draft', editor.value); document.getElementById('autosaveStatus').textContent = 'Draft saved'; } }, 5000); // Restore draft on load (function restoreDraft() { const saved = localStorage.getItem('md_editor_draft'); if (saved) { editor.value = saved; renderPreview(); updateStats(); document.getElementById('autosaveStatus').textContent = 'Draft restored'; } })(); // Email popup function closeEmail() { document.getElementById('emailOverlay').classList.remove('show'); localStorage.setItem('emailDismissed', '1'); } function submitEmail() { const email = document.getElementById('emailInput').value; if (email && email.includes('@')) { gtag('event', 'email_signup', { event_category: 'conversion' }); alert('Thanks for subscribing!'); closeEmail(); } else { alert('Please enter a valid email.'); } } if (!localStorage.getItem('emailDismissed')) { setTimeout(() => { document.getElementById('emailOverlay').classList.add('show'); }, 30000); }

Like this? Get 30 more free tools in your inbox.