Markdown Viewer and Editor

Write or upload Markdown and see a live preview with GitHub-style tables, task lists and strikethrough. Pasted HTML is shown as text, never run.

The interactive tool loads here when JavaScript runs.

About this tool

What is the Markdown Viewer?

The Markdown Viewer is an editor with a live preview. Type or paste Markdown into the editor and the preview updates on every keystroke. Split view shows both panels stacked, Edit shows only the source and Preview shows only the rendered result.

Rendering follows CommonMark with the GitHub Flavored Markdown extensions: pipe tables, task list checkboxes, ~~strikethrough~~ and bare URLs turned into links. You can upload a .md or .txt file to open it, rename it in the File Name field and download your edited version as a .md file.

Your document and file name are saved in this browser as you edit, so a reload or a later visit opens the same draft. Reset brings back the welcome text and deletes that saved copy. The preview is also safe for untrusted input: raw HTML is displayed as text instead of being rendered, and javascript: links are removed, so a pasted README cannot run script in your browser.

  • Live preview with CommonMark and GitHub Flavored Markdown
  • Tables, task lists, strikethrough and autolinks
  • Split, Edit and Preview modes plus fullscreen
  • Upload .md or .txt and download as .md
  • Safe preview: raw HTML is not rendered and javascript: links are removed
Read the guide: Markdown Syntax That Renders Everywhere: CommonMark, GFM Tables and Task Lists

Updated

How to use the Markdown Viewer

  1. Type or paste Markdown into the Markdown Editor panel, or click Upload to open a .md or .txt file from your computer.
  2. Choose Split to see editor and preview together, Edit for the source only, or Preview for the rendered document.
  3. Check tables, task lists and code blocks in the Preview panel as you type.
  4. Set the File Name and click Download to save the document as a .md file. On a desktop, Fullscreen hides the browser chrome while you write.

Worked examples

A table and a task list

Input

| Step | Owner |
| --- | --- |
| Draft | Ana |

- [x] Outline
- [ ] Review

Output

A two-column table with one row (Draft, Ana), followed by a list with one ticked and one empty checkbox.

The delimiter row under the header is what makes it a table, and the blank line keeps the list from merging into it. Checkboxes in the preview are read-only; change [ ] to [x] in the source to tick one.

Pasted HTML stays inert

Input

Hello <img src=x onerror="alert(1)">

Output

Hello <img src=x onerror="alert(1)"> (shown as plain text)

The tag is displayed rather than rendered, so no image request is made and no script runs. GitHub and other renderers may show different results for the same HTML.

Background and insight

John Gruber released Markdown in 2004, with Aaron Swartz contributing to the syntax. The original description left many edge cases open, which is why the same file used to render differently on different sites. CommonMark, a community specification started in 2014, pinned those cases down, and GitHub published its GitHub Flavored Markdown spec in 2017 as a strict superset of CommonMark that adds tables, task lists, strikethrough and extended autolinks.

Most broken Markdown comes from blank lines. A list or table that directly follows a paragraph line may be swallowed into that paragraph. A table also needs its delimiter row (| --- | --- |) under the header, or it is just text with pipes in it. A single newline inside a paragraph is not a line break; end the line with two spaces or a backslash, or leave a blank line for a new paragraph.

Markdown allows inline HTML, and many renderers pass it straight through. That is convenient for your own documents and dangerous for anyone else's, because an <img onerror> or <script> tag runs with the page's privileges. This viewer builds the preview as React elements from a Markdown syntax tree and never injects HTML, so tags appear as literal text. Headings are rendered one level lower than written (# becomes a second-level heading) so the document's title fits under the page heading.

Common use cases

  • README checks

    Preview a README or CHANGELOG before pushing to see whether tables and lists come out the way you expect.

  • Reading .md files

    Open a Markdown file someone sent you and read it formatted, without installing an editor.

  • Writing docs and notes

    Draft design notes, runbooks or meeting minutes with headings, code blocks and checklists, then download the .md.

  • Learning the syntax

    Try a construct in the editor and see immediately how it renders.

Tips and limitations

  • The draft is kept in this browser's localStorage, not on a server. Download the .md file to move it to another device or keep a backup.
  • Leave a blank line before lists, tables and code fences that follow a paragraph.
  • HTML is shown as text, not rendered. If a document depends on embedded HTML for layout, it will look different here than on GitHub.
  • Uploads and Reset replace the editor content and the saved draft without asking, so download your current work first.
  • Relative image paths from a repository will not resolve here; only absolute image URLs load.

Sources and further reading

  1. Markdown, Daring Fireball. John Gruber's original 2004 description
  2. CommonMark Spec, CommonMark. The unambiguous specification, including blank-line and line-break rules
  3. GitHub Flavored Markdown Spec, GitHub. Tables, task lists, strikethrough and autolinks
  4. A formal spec for GitHub Flavored Markdown, The GitHub Blog. The 2017 announcement
  5. Cross Site Scripting Prevention Cheat Sheet, OWASP. Why rendering untrusted HTML is risky

Frequently asked questions

Which Markdown flavor does the viewer support?

CommonMark plus the GitHub Flavored Markdown extensions: pipe tables, task lists, strikethrough with double tildes and automatic links for bare URLs. Footnotes are also handled by the GFM plugin. Other site-specific extensions such as Mermaid diagrams or math blocks are not rendered.

Is it safe to paste Markdown from an untrusted source?

Yes, for viewing. Raw HTML in the input is displayed as literal text instead of being rendered, and links with the javascript: scheme are stripped. The preview is built as React elements rather than injected HTML, so script tags and event-handler attributes never execute.

Why is my Markdown table not rendering?

The usual cause is a missing delimiter row. A table needs a header row, then a row like | --- | --- | with the same number of columns, then the data rows. A missing blank line between the table and the paragraph above it causes the same symptom.

Does the Markdown Viewer save my document?

Yes, in this browser. The editor text and file name are written to localStorage as you type and restored on your next visit. Nothing is uploaded or synced, so use Download for a .md file you can open elsewhere, and Reset to clear the saved draft.

Why does my # heading look smaller than expected?

Preview headings are shifted down one level, so # renders as a second-level heading and ## as a third. The page already has its own main heading, and this keeps the document structure valid. The downloaded file keeps your original # markers.

How do I add a line break inside a paragraph?

End the line with two spaces or a backslash before pressing Enter. A single newline on its own is treated as a space in CommonMark. Leave a completely blank line to start a new paragraph.

Is there an in-depth guide to the Markdown Viewer?

Yes. “Markdown Syntax That Renders Everywhere: CommonMark, GFM Tables and Task Lists” covers the background, how it works, common pitfalls and worked examples. Read the full guide.