Online Markdown Editor With Live Preview
Write Markdown on one side and see the formatted result on the other as you type. The example draft is 75 words, 366 characters, 1 min read. A toolbar and the shortcuts Ctrl or ⌘ with B, I and K insert the syntax for you, and the draft is saved in this browser so a reload does not lose it. It reads CommonMark 0.31.2 plus GitHub-style tables, strikethrough and task lists, and the preview cannot run anything: raw HTML is shown as text and script addresses are neutralized. To turn finished Markdown into HTML in bulk with options, use the Markdown to HTML converter.
Updated By ponderloop editorial · How we checkRuns in your browser: nothing you enter is uploadedHow this tool works
Replace the example and write. Shortcuts: Ctrl or ⌘ with B (bold), I (italic) and K (link).
Preview
Meeting notes
Write on the left, read on the right. Make text bold, italic or struck out, and a raw tag such as <b>this</b> is shown as text, never run.
- Draft the agenda
- Send the notes
| Owner | Task |
|---|---|
| Sam | Agenda |
| Priya | Notes |
const done = 1;
Save often: this page keeps a draft in your browser.
Draft: Autosave on
Your text is converted on this device and never uploaded. The draft is saved in this browser only; Clear deletes it. Raw HTML in your Markdown is escaped, never run.
Counts
- Words
- 75
- Characters
- 366
- Lines
- 18
- Reading time
- 1 min read
Markdown cheat sheet
- Heading
- ## Title
- Bold
- **bold**
- Italic
- *italic*
- Strikethrough
- ~~gone~~
- Link
- [text](https://example.com)
- Image
- 
- Bulleted list
- - item
- Numbered list
- 1. item
- Task list
- - [x] done
- Quote
- > quoted
- Inline code
- `code`
- Code block
- ```js … ```
- Table
- | a | b | then |---|---|
- Divider
- ---
Need the full converter with options and an HTML download? Use the Markdown to HTML converter.
Toolbar buttons and shortcuts
| Button | Shortcut | Selected text | Result | What it does |
|---|---|---|---|---|
| Bold | Ctrl+B or ⌘B | text | **text** | Wraps the selection in two asterisks. Press again to remove them. |
| Italic | Ctrl+I or ⌘I | text | *text* | Wraps the selection in one asterisk. Press again to remove it. |
| Heading | none | Title | # Title | Cycles the line through #, ## and ### and back to plain text. |
| Link | Ctrl+K or ⌘K | text | [text](https://) | The selection becomes the link text and the address is selected, ready to paste over. A selected web address becomes the target instead. |
| List | none | one ⏎ two | - one ⏎ - two | Starts every selected line with a dash. Press again to remove the dashes. |
| Code | none | text | `text` | Backticks around a selection on one line, a fenced block around several lines. |
| Quote | none | quoted | > quoted | Starts every selected line with a greater-than sign. |
| Table | none | (empty) | | Column 1 | Column 2 | ⏎ |:---------|:---------| ⏎ | Cell | Cell | ⏎ | Adds a two-column table below the cursor, with blank lines around it. |
Markdown cheat sheet
| Syntax | You type | HTML | Notes |
|---|---|---|---|
| Heading | ## Title | <h2>Title</h2> | One to six # signs. |
| Emphasis and strong | *slanted* and **bold** | <p><em>slanted</em> and <strong>bold</strong></p> | Becomes em and strong. |
| Strikethrough (GFM) | ~~gone~~ | <p><del>gone</del></p> | Becomes del. |
| Inline code | `a < b` | <p><code>a < b</code></p> | Escaped, never read as Markdown or HTML. |
| Link | [text](https://example.com) | <p><a href="https://example.com">text</a></p> | Opens in a new tab in the preview. |
| Image |  | <p><img src="/pic.png" alt="Alt text" /></p> | Shown as a placeholder in the preview; the HTML keeps the address. |
| Bulleted list | - one ⏎ - two | <ul> <li>one</li> <li>two</li> </ul> | Use -, + or *. Indent to nest. |
| Numbered list | 1. one ⏎ 2. two | <ol> <li>one</li> <li>two</li> </ol> | The first number sets the start. |
| Task list (GFM) | - [x] done ⏎ - [ ] to do | <ul> <li><input type="checkbox" checked="" disabled="" /> done</li> <li><input type="checkbox" disabled="" /> to do</li> </ul> | Disabled check boxes in the preview. |
| Block quote | > quoted | <blockquote> <p>quoted</p> </blockquote> | Can hold lists and more quotes. |
| Fenced code block | ```js ⏎ let a = 1; ⏎ ``` | <pre><code class="language-js">let a = 1; </code></pre> | The word after the fence becomes the class language-js. |
| Table (GFM) | | a | b | ⏎ |:--|--:| ⏎ | 1 | 2 | | <table> <thead> <tr> <th align="left">a</th> <th align="right">b</th> </tr> </thead> <tbody> <tr> <td align="left">1</td> <td align="right">2</td> </tr> </tbody> </table> | Colons in the second row align the column. |
| Thematic break | --- | <hr /> | Three or more -, * or _ on their own line. |
What the preview does with unsafe text
| You type | HTML | What happens |
|---|---|---|
| <script>alert(1)</script> | <p><script>alert(1)</script></p> | Raw HTML is escaped and shown as text. |
| <img src=x onerror=alert(1)> | <p><img src=x onerror=alert(1)></p> | An event attribute never runs: the whole tag is text. |
| [click me](javascript:alert(1)) | <p><a href="">click me</a></p> | A javascript: address is replaced by an empty one. |
| </script>) | <p><img src="" alt="x" /></p> | A data: address that is not a raster image is blocked. |
| <a href="javascript:alert(1)" onclick="alert(1)">raw link</a> | <p><a href="javascript:alert(1)" onclick="alert(1)">raw link</a></p> | A tag with an href or onclick is text, not a link. |
How to write Markdown with a live preview
- Write or paste. Type in the editor or replace the example with your own text. The preview updates as you type; on a phone, switch between Write and Preview.
- Format with the toolbar. Select some text and press a toolbar button, or use Ctrl or ⌘ with B for bold, I for italic and K for a link. With nothing selected, the button inserts a placeholder and selects it.
- Check the counts. Words, characters, lines and reading time update with every edit.
- Copy or download. Copy the Markdown, copy the HTML it makes, or download the draft as a .md file. The draft also stays in this browser until you press Clear.
Frequently asked questions
- Is my text uploaded?
- No. The preview is built on your device and nothing is sent anywhere. The draft is saved in this browser’s local storage so a reload or a closed tab does not lose it; Clear removes the draft, and clearing the site’s data in your browser does too. It is not synced to other devices.
- Which Markdown does the editor understand?
- The CommonMark core (version 0.31.2) with the GitHub Flavored Markdown tables, strikethrough and task lists (0.29-gfm). Footnotes, math, definition lists, heading anchors and emoji shortcodes are not part of it, and neither is syntax highlighting inside code blocks.
- Is the preview safe to use with text from someone else?
- Yes. Raw HTML is escaped and shown as text, the address of every link and image is checked, and javascript:, vbscript: and non-image data: addresses are replaced with an empty one. The preview is also copied through an inert document that keeps only allow-listed tags and attributes, so a script, an event attribute or a style cannot reach the page. Images are not loaded in the preview, so nothing contacts another website.
- How is the reading time worked out?
- It divides the word count by 238 words per minute, a measured average for silent reading of non-fiction, and rounds up to whole minutes. The example draft has 75 words, which is 1 min. Technical text and screen reading are usually slower, so treat it as a rough guide. Words are runs of characters between spaces, so Markdown symbols such as a dash that stands alone count as words.
- Where is my draft kept, and how do I remove it?
- In this browser’s local storage under one key (markdown-editor:draft), about half a second after you stop typing; the label next to the editor changes from Saving to Saved when it is written. Clear empties the editor and deletes the draft. Private windows may discard it when they close, and a browser with storage turned off keeps the draft only until the page is closed.
- How do I copy the result into another site?
- Copy Markdown puts the text you wrote on the clipboard, for a README, an issue tracker or a note app that reads Markdown. Copy HTML puts the converted HTML fragment on the clipboard (no html, head or body tags), for a page or a CMS that wants HTML. Download .md saves the Markdown as a file named document.md.
- What is the difference between this editor and the Markdown to HTML converter?
- They share one converter. This page is for writing: a toolbar, shortcuts, a side-by-side preview, counts and a saved draft. The Markdown to HTML converter is for converting: options for line breaks and GitHub extras, a box with the HTML source and a download of the .html file, and it never saves your text.
- Why does my table or task list not show up?
- A table needs a header row, a delimiter row with the same number of cells (for example |---|---|) and a blank line before it. A task list item needs a list marker, a space and [ ] or [x]. The Table button adds a working template, and the Markdown Table Generator builds one from a spreadsheet.
- How large a document can I write?
- The preview converts up to 500,000 characters; longer text stays in the editor but is cut off in the preview and in Copy HTML, and a notice says so. Very large drafts are converted after a short pause instead of on every keystroke.
How it works
The counts and the toolbar are plain functions of the text and the selection. Words are runs of non-space characters, characters are Unicode code points, and reading time is the word count divided by 238 words per minute, rounded up. Each toolbar button computes the new text and the new selection from the old ones, then replaces only the changed part through the browser’s editing command, so Undo and Redo keep working. The preview uses the converter of the Markdown to HTML tool, a parser written for this site that follows the CommonMark specification (version 0.31.2) and the GitHub Flavored Markdown specification for tables, strikethrough and task lists. It escapes all raw HTML, decodes and checks every URL before comparing its scheme, and the result is copied into the page through an inert parsed document that keeps only allow-listed tags and attributes. The converter is loaded on first use, so a visitor who only reads the page does not download it. The draft is stored as one string in local storage and is never sent anywhere.
Sources
More free tools
- Markdown to HTML ConverterConvert Markdown to HTML with a live, safe preview. CommonMark plus tables, strikethrough and task lists. Raw HTML is escaped. Runs in your browser.
- Markdown Table GeneratorBuild a GitHub Markdown table from an editable grid or pasted CSV, TSV or spreadsheet cells. Set column alignment, pad columns, and parse a table back.
- HTML to Text ConverterPaste HTML and get plain text: tags, scripts and comments removed, entities decoded, lists, links and tables kept readable. Runs in your browser.
- JSON Schema ValidatorValidate JSON against a JSON Schema (draft 2020-12 and 07 subset): every error with its path and rule, exact decimals, optional format checks.
- JSON Formatter & ValidatorValidate JSON with the exact line and column of any error, then pretty-print, minify or sort keys. Big numbers keep every digit. Runs in your browser.
- CSV to JSON ConverterConvert CSV to JSON in your browser: quoted fields, line breaks, any delimiter, and the exact line and column of an error. Converts JSON to CSV too.
More: Formatters and data convertersAll developer toolsAll toolsHome & DIY calculators