OnlineTextLab
Esc

Markdown Previewer

Write Markdown on one side and read the formatted result on the other, with your draft kept in this browser.

Your formatted text appears here as you write

# Heading**bold***italic*`code`- list1. list> quote[link](url)
0 words

Runs on your device. Your files and text are not uploaded.

About Markdown Previewer

This is a place to write, not a converter. Type on the left, see the formatted page on the right on every key press, and catch the broken table or unclosed code fence while you are still in the sentence. It suits READMEs, meeting notes, issue descriptions and first drafts of posts.

The writing side has the help you would expect from a small editor. There is a toolbar for people who do not have the syntax memorized, keyboard shortcuts for those who do, and lists that continue themselves when you press Enter. If you close the tab by accident, the text is still there when you come back.

When the draft is done, take it wherever it needs to go. Copy it as formatted text to paste into an email or a document, copy the Markdown, or download a .md file. If you want the HTML source itself, carry the file to Markdown to HTML, which has the options for that job.

How it works

Each change re-parses the whole text and replaces the preview, once per animation frame at most, so typing stays smooth. Documents over 50,000 characters wait for a short pause in your typing before updating. Before anything reaches the page, the generated HTML passes through a sanitizer, and raw HTML tags in your text are displayed as text and never parsed. A javascript: link or an onerror attribute in pasted text therefore stays inert.

Your draft is saved to this browser's local storage a moment after you stop typing, under a single slot. It is not sent anywhere, and Clear removes it. Formatting buttons insert text the same way typing does, so Ctrl+Z still undoes them, and undo also brings back text removed with Clear.

Scroll position is matched by proportion: when the editor is 40 percent of the way down, the preview goes to 40 percent. The status line counts words split on whitespace and estimates reading time at 200 words per minute, a common rule of thumb.

How to use Markdown Previewer

  1. Start typing, press Try an example, or use Open file for a .md or .txt file.
  2. Use the toolbar, or press Ctrl+B for bold, Ctrl+I for italic and Ctrl+K for a link. On a Mac, use Cmd.
  3. Choose Both, Write or Read to set the layout, and Focus to fill the screen. Press Esc to leave focus mode.
  4. Finish with Copy formatted text, Copy Markdown or Download .md.

What the preview is rendering

Input
Status: **on track**

- [x] Draft
- [ ] Review

> Needs sign-off by *Friday*.
Output
<p>Status: <strong>on track</strong></p>
<ul>
<li class="task-list-item"><input type="checkbox" disabled checked> Draft</li>
<li class="task-list-item"><input type="checkbox" disabled> Review</li>
</ul>
<blockquote>
<p>Needs sign-off by <em>Friday</em>.</p>
</blockquote>

The output shown is the markup behind the preview, which on the page appears as bold text, two checkboxes and an indented quote. The checkboxes are disabled because a preview has nothing to save a tick to, so change [ ] to [x] in the text.

When it helps

  • Writing a README and checking that its install steps, code fences and tables render before you commit.
  • Drafting a pull request or issue description that is too long to write comfortably in a small web form.
  • Taking meeting notes in Markdown, then pasting them into an email with Copy formatted text so the headings and lists survive.

Tips for a better result

  • Inside a list, Enter starts the next item and continues the numbering, and Enter on an empty item ends the list. Tab nests the item under the one above it, using the right indent for that item, and Shift+Tab moves it back out.
  • Outside a list, Tab moves focus out of the editor as usual, so keyboard users are never trapped in it.
  • On a phone, Write and Read give each view the whole screen, which is easier than scrolling between two stacked panes.
  • Select a web address and press Ctrl+K, and the address becomes the link target with the link text ready to type over.

Good to know

  • One draft is kept per browser, so starting something new replaces the last one. Download anything you want to keep, and press Clear when you finish on a shared computer.
  • Private windows and clearing site data both erase browser storage, so do not treat it as your only copy.
  • Raw HTML such as <details> displays as text here. Footnotes, math, diagrams and emoji shortcodes are not rendered either.
  • The preview uses this site's type styles, not GitHub's or your blog's, so spacing and fonts will differ where you publish.
  • Remote images in your text are fetched from their own servers to show them.

Questions people ask

Where is my draft stored?

In this browser's local storage on this device, and nowhere else. It is not uploaded or synced, so it will not appear on your phone if you started on a laptop, and anyone using the same browser profile can see it until you press Clear.

What does Copy formatted text do?

It places the rendered version on your clipboard as rich text, along with a plain version. Pasting into an email, Google Docs or Microsoft Word then keeps headings, lists and links, without any Markdown symbols. If a browser blocks this, the button selects the preview so you can press Ctrl+C.

Why is my nested list not nesting?

A nested item has to line up with the text of its parent item, not with its marker. Under "- " that takes two spaces, and under "1. " it takes three. The quickest fix is to put the cursor on the item and press Tab.

Can I get the HTML out of here?

This page keeps the focus on writing, so it copies formatted text and saves Markdown. After a download, the next-step panel can carry your file straight to Markdown to HTML, where you get the source and can choose a fragment or a full document.

What to use next

Last reviewed . Read our editorial policy.