Markdown Preview and Online Editor

Type or open a Markdown file and see, as you type, roughly what GitHub will show for your README, with tables, task lists, alerts, code and Mermaid diagrams.

Source

In the print dialog, choose “Save as PDF” as the destination.

How to use

  1. Type or paste Markdown into the editor, or press Open file to load a .md file (up to 5 MB); you can also drop the file onto the editor.
  2. Watch the Preview tab update as you type. On a wide screen the editor and preview sit side by side and scroll together; on a phone, switch between Edit and Preview.
  3. Open the HTML tab to see the generated markup, or press Copy HTML to copy it.
  4. Press Download PDF and choose “Save as PDF” in the print dialog to save the rendered document, or press Clear to start over.

About this tool

What GitHub adds to Markdown

GitHub Flavored Markdown (GFM) is CommonMark plus a few extensions, all supported here:

  • Tables: a header row, a delimiter row such as | --- | :---: | (colons set the alignment), then data rows.
  • Task lists: - [ ] for an open item and - [x] for a done one.
  • Strikethrough: ~~like this~~.
  • Autolinks: a bare https://… or www.… address becomes a link without brackets.

Alerts

Alerts are blockquotes whose first line is a label: > [!NOTE], > [!TIP], > [!IMPORTANT], > [!WARNING] or > [!CAUTION]. Every following line starts with > too. GitHub shows each type with its own color and icon. Keep them for information readers must not miss; a page full of alerts reads like a page with none.

Mermaid diagrams

A fenced code block whose language is mermaid is drawn as a diagram instead of shown as code:

flowchart TD
  A[Open issue] --> B{Bug?}
  B -->|yes| C[Fix]
  B -->|no| D[Close]

The first line names the diagram type (flowchart, sequenceDiagram, gantt…). TD draws top to bottom and LR left to right; [ ] makes a box, { } a decision and -->|text| a labeled arrow. Check the drawing here before you push: a typo in a Mermaid block shows up as a broken diagram on GitHub too.

GFM compared with plain CommonMark

A CommonMark-only renderer shows tables and task lists as plain text, leaves ~~ in place and links only URLs written in angle brackets. Alerts and Mermaid are not part of the GFM spec at all: they are GitHub features, so many other sites show an alert as an ordinary quote and a diagram as a code block. Check where your file will be read before relying on them.

Privacy

Rendering happens in your browser. The file you open and the draft you type are not uploaded; the draft is kept in this browser so it is still there when you come back.

Common mistakes

  • A table without the delimiter row, or with a different number of cells in the header and delimiter rows, is not a table.
  • - [] without the space inside the brackets is not a task.
  • An alert inside a list item or another quote is not recognized: alerts cannot be nested.
  • A single line break inside a paragraph does not start a new line in a README. End the line with a backslash or two spaces, or leave a blank line.

Frequently asked questions

Does this preview look exactly like GitHub?

It follows GitHub Flavored Markdown and also renders GitHub's alerts and Mermaid diagrams, so a README looks very close to what GitHub shows. Fonts and spacing can differ slightly.

Is my Markdown uploaded anywhere?

No. Files you open and text you type are rendered in your browser and are not uploaded. The draft is saved only in this browser.

How do I make a note or warning box in Markdown?

Start a blockquote with a label on its own line, such as > [!NOTE] or > [!WARNING], and begin each following line with >. GitHub supports NOTE, TIP, IMPORTANT, WARNING and CAUTION.

How do I add a diagram to a README?

Put Mermaid code in a fenced code block with the language mermaid. GitHub draws it as a diagram, and this preview does the same so you can check it first.

Can I export the result?

Yes. Copy HTML copies the rendered HTML. Download PDF opens your browser's print dialog, where you choose Save as PDF as the destination.