Every dayEveryday Use

Markdown
viewer.

Write or paste Markdown and see it formatted as you type, then copy the clean HTML.

How it's worked out

The viewer reads your text one line at a time. A line that starts with # is a heading, a line that starts with a dash or a number is a list item, three backticks open and close a code block, and a line of pipes with a row of dashes under it starts a table. Everything else is a paragraph, and lines with no blank line between them join into one paragraph.

Before any formatting, every character that could start HTML is escaped. That is why <script>alert(1)</script> comes out as the text &lt;script&gt;alert(1)&lt;/script&gt; and never runs. Link addresses must start with http, https, mailto, # or /, an allow-list of the kind the OWASP cheat sheet on cross-site scripting recommends. Any other address, such as javascript:, is replaced by #.

Inline marks follow CommonMark: two asterisks for bold, one for italic, backticks for code. **Hello**, *world* becomes <p><strong>Hello</strong>, <em>world</em></p>. Tables, task lists and strikethrough follow GitHub Flavored Markdown.

The page already has its own main title, so the preview moves each heading down one level: # Title shows as <h2 class="md-h1">Title</h2>, styled like a top heading. When you copy or export, the HTML keeps your real levels.

The word count strips Markdown symbols and code blocks, then counts what is left. Reading time divides it by 238 words a minute, the average for silent reading of nonfiction in a 2019 review by Marc Brysbaert.

Worked examples

A README with a skipped heading

A developer writes a README for a small map tool. Under "Usage" (8 words) the options go under #### Options. The structure check flags that heading: it jumps from level 2 to level 4. A table of contents or a screen reader would show a gap there. Changing it to ### Options fixes it. The map also shows that the options section, at 14 words, is the longest part of the file.

Open this example in the tool

A release plan from a spreadsheet

A project lead copies 3 rows and 3 columns from a sheet into the table builder. One cell reads "iOS | Android", and a bare pipe would split it into two columns. The builder escapes it, so the table reads:

| Release | Platform | Date |
| --- | --- | --- |
| 2.4 | iOS \| Android | Nov 3 |
| 2.5 | Web | Dec 1 |

Rendered, it has 6 body cells, the same as the sheet, with "iOS | Android" kept in one cell. Insert at the cursor drops it into the document with a blank line on each side.

Open this example in the tool

An email pasted with its HTML

A support agent pastes a shipping update that still carries its email markup. The check counts 4 HTML tags, the opening and closing div and b tags, and shows them as text. Of the 2 links, 1 uses javascript:, so the preview points it at # and the check says so. The carrier link keeps its address.

Open this example in the tool

Reading your result

The status panel gives the word count, the reading time and whether the document is saved. "Saved in this browser" means the text sits in this browser's local storage on this device. It stays after a reload, but it is not on your other devices.

The sentence under the figures is the structure check. Headings should step down one level at a time, as the W3C heading tutorial advises, because tables of contents and screen readers build their lists from them. One # heading per document is usual for a README or an article. A section pasted from a longer file often starts at ##, so a missing # title is not flagged.

The document map draws a bar for each section, sized by the words under that heading. The longest bar is brass. A section far longer than the rest is often two topics. Pick any row to jump to that heading in the source.

Images show as links in the preview, because loading a picture from another site would tell that site you opened the page. HTML tags show as text for the same safety reason. If you need either one, paste the copied HTML into a page that allows it.

Common mistakes

  • No blank line before a list or table. Many renderers, GitHub's among them, read a list typed right under a paragraph as part of that paragraph. Leave a blank line before lists, tables and code blocks.
  • Expecting one Enter to start a new line. Two lines with no blank line between them join into one paragraph. Leave a blank line to start a new paragraph.
  • A table without its dash row. The second line of a table must be dashes between pipes, such as | --- | --- |. Without it the rows show as plain text.
  • A bare pipe inside a cell. It starts a new column. Write \| instead, or let the table builder do it.
  • Nested lists and footnotes. This viewer shows the common subset used in READMEs and notes. Indented sub-items show as one flat list, and footnotes stay as typed.

Questions people ask

Open the .md file in any text editor, select all, copy and paste it into the Markdown box. On a laptop the preview sits beside the source; on a phone, tap Preview above the box.

Sources