Free Markdown Editor
Write and preview Markdown in real time. Supports headings, bold, italic, code blocks, tables, and lists.
Markdown cheatsheet
Common uses
- Write API Documentation in MarkdownDraft endpoint descriptions, request/response examples, and parameter tables in Markdown.
- Take Markdown NotesWrite structured notes in Markdown that can be pasted into Notion, Obsidian, Bear, or any Markdown app.
- Write a GitHub README in MarkdownDraft and preview your GitHub repository README with live Markdown rendering.
- Write Technical DocumentationWrite and preview API docs, wikis, and technical guides in Markdown before publishing.
- Write Blog Posts in MarkdownDraft blog posts in Markdown for Ghost, Jekyll, Hugo, Hashnode, and other Markdown-based publishing platforms.
How It Works
The preview is rendered by a hand-written Markdown parser built directly into the tool β no marked, no remark, no external library. It tokenizes the source line-by-line in the browser, converting syntax into HTML that is then passed through a sanitizer before display.
- 1Line-by-line tokenizationThe custom renderMarkdown function splits your source on newlines and walks through them in a single pass, matching fenced code blocks, headings (H1βH6), blockquotes, ordered and unordered lists, GFM tables (with column-alignment), horizontal rules, and paragraphs in priority order.
- 2Inline syntax expansionEach collected line or cell is then processed by inlineMarkdown, a chain of regex replacements that handles bold (** and __), italic (* and _), bold-italic (***), strikethrough (~~), inline code (), images (), and links ([text](url)) β images are resolved before links so the ! prefix is not consumed incorrectly.
- 3Sanitization and remote-resource blockingThe raw HTML produced by the renderer is passed through a sanitizer (sanitize-html) to strip unsafe tags and attributes such as <script>, onerror handlers, and javascript: hrefs. A second pass (neutralizeRemote) replaces remote image src values with placeholders by default, preventing the preview from silently phoning home to external servers before you opt in.
- 4Export as .md or standalone .htmlCopying or downloading Markdown writes the raw source text. Downloading HTML wraps the sanitized output in a self-contained document with its own inline stylesheet β Tailwind classes only work inside the site, so the export bundles plain CSS rules instead, making the file readable anywhere.
Related Tools
HTML to Markdown Converter
Convert HTML to clean Markdown. Handles headings, lists, links, images, code blocks, tables, and blockquotes. Perfect for moving content out of CMSes.
Markdown to HTML Converter
Convert Markdown to clean HTML with live preview. Use the source view to copy ready-to-paste HTML for blogs, CMSes, or email templates.
Mermaid Diagram Editor
Write flowcharts, sequence diagrams, Gantt charts, and more in Mermaid syntax with a live preview. Export as SVG or PNG. Runs entirely in your browser.