# Markdown preview: what this renderer supports and how it differs from CommonMark

> A tested map of the previewer's small built-in renderer: supported blocks and inline syntax, link and HTML safety rules, how the word, character, line and reading-time counts work, and where output differs from CommonMark and GitHub.

- Tool: [Markdown Previewer](https://toolsg.com/en/markdown-previewer)
- Language: en (available: en, zh, ms, ta)
- Last verified against official sources: 2026-10-20
- Source site: ToolSG — a planning guide, not official or financial advice. Cite the agencies listed under Sources.

## Key figures at a glance

| Fact | Value | Source |
| --- | --- | --- |
| Renderer | A compact built-in subset, not a full CommonMark engine — Headings, paragraphs, flat lists, one-level quotes, fenced code, links, emphasis, strikethrough and inline code. | [CommonMark specification 0.31.2](https://spec.commonmark.org/0.31.2/) |
| Raw HTML | Escaped and shown as text — CommonMark passes raw HTML through; this previewer deliberately does not. |  |
| Clickable links | http, https, mailto, tel, paths starting with / and #anchors — Anything else, including relative paths such as docs/a.md, becomes plain label text. |  |
| Reading time | Words ÷ 200, rounded up, minimum 1 minute — Words are counted by splitting the raw Markdown on whitespace, so markup symbols count too. |  |

## What it is

The page converts the text on the left into HTML on the right as you type, entirely in your browser. It does not call a Markdown library: it has a short renderer of its own, written for common documentation syntax. That is useful for a quick draft, but it is not a conformance check. When the final home of your text is GitHub, GitLab or a static-site generator, those use CommonMark or GitHub Flavored Markdown (GFM) and can render the same source differently.

The comparison below was produced by running the same snippets through this page and through a CommonMark 0.31.2-compliant reference implementation (league/commonmark 2.8).

## What works

| Syntax | Rendered as |
| --- | --- |
| `# H1` … `###### H6` | Headings; a space after the hashes is required, so `#hashtag` stays text |
| Blank-line separated text | Paragraphs; consecutive lines in a paragraph are joined with a space |
| `-`, `*` or `+` items | One flat bulleted list (the three markers are treated alike) |
| `1.` items | A numbered list (numbers in the source are ignored) |
| `> text` | A blockquote; consecutive lines are separated with line breaks |
| ` ```lang ` … ` ``` ` | A code block with the language label shown above it; contents are not interpreted |
| `**bold**`, `__bold__`, `*em*`, `_em_`, `~~del~~` | Strong, emphasis, strikethrough |
| `` `code` `` | Inline code |
| `[label](url)` | A link opening in a new tab with `rel="noopener noreferrer nofollow"` |
| `---`, `***`, `___` on a line | A horizontal rule |

## Differences from CommonMark

| Source | This previewer | CommonMark 0.31.2 |
| --- | --- | --- |
| `Title` then `=====` | paragraph "Title =====" | level-1 heading |
| `Sub` then `---` | paragraph and a rule | level-2 heading |
| `- b` with an indented `- nested` | flat list plus a stray paragraph "- nested" | nested list |
| `3. three` `4. four` | list numbered from 1 | starts at 3 |
| `1. a`, blank line, `2. b` | two separate lists, each numbered 1 | one list |
| `> a` / `> b` | two lines with a line break | one paragraph, soft break |
| `> - item` | quote containing the text "- item" | quote containing a list |
| `snake_case_name` | `snake` + italic `case` + `name` | unchanged text |
| `**bold *nested* bold**` | garbled asterisks and italics | strong with nested emphasis |
| `~~~` fences, 4-space indented code | not code; becomes a paragraph (tilde pairs become strikethrough) | code blocks |
| unclosed ` ``` ` fence | plain paragraph | code to the end of the document |
| `![alt](img.png)` | a "!" followed by a link; no image | an image |
| `<https://x.com>`, bare URLs | shown as text | autolinked (bare URLs only in GFM) |
| `line  ` (two trailing spaces) or `\` at line end | joined with a space | hard line break |
| `\*literal\*`, `&amp;`, `&copy;` | backslash kept, `&amp;` shown literally | `*literal*`, `&`, © |
| `<b>raw</b>`, `<script>` | shown as text | passed through as HTML |
| `1) item` | paragraph | ordered list |
| `* * *` | a bullet with italic space | thematic break |
| `# Title #` | heading "Title #" | heading "Title" (closing hashes removed) |
| pipe tables, `- [ ]` task items | plain text / plain bullets | not in CommonMark; GFM adds both |

If your document relies on anything in the right-hand column, test it in the real target.

## Links and safety

A link is rendered only if the URL starts with `http:`, `https:`, `mailto:` or `tel:`, or with `/` or `#`. `javascript:`, `ftp:` and relative paths such as `docs/a.md` are dropped and only the label is kept. URLs end at the first `)` and titles (`[t](url "title")`) are not supported, so URLs containing parentheses and linked titles break. All text is HTML-escaped before the Markdown rules run, and links open with `rel="noopener noreferrer nofollow"`, so pasted markup cannot run scripts in the page. Nothing leaves the browser.

## The counters

| Counter | Rule | Example |
| --- | --- | --- |
| Words | raw text split on whitespace | `one two three` is 3; the Chinese line 你好世界，这是一个测试。 counts as 1 because it has no spaces |
| Characters | length of the raw text (UTF-16 units) | `😀 emoji` is 8, because the emoji counts as 2 |
| Lines | raw lines, blank ones included | `a`, three blank lines, `b` is 5 |
| Reading time | ceil(words ÷ 200), at least 1 minute when there is text | 201 words is 2 min |

Because words are counted on the Markdown source, `#`, `-` and `**` tokens count as words when set apart by spaces. Treat the numbers as rough, and not as a CJK word count.

> **Tip:** Before pasting into GitHub, keep to the shared core: ATX headings, `-` lists without nesting, fenced code with backticks, and inline links with absolute URLs. Those render the same here and there.

## Common mistakes

- Relying on nested lists, tables or task lists; this page cannot show them.
- Using `_` inside words (`my_var_name`), which this page italicises but CommonMark does not.
- Expecting the page to flag errors: it never reports invalid Markdown.
- Writing relative links (`docs/a.md`) and wondering why they are not clickable.
- Expecting raw HTML, such as `<details>`, to show as in GitHub; here it is shown as text.

## Related tools

Count words, characters and lines with a [word counter](https://toolsg.com/en/word-counter), spot hidden characters with the [hidden character cleaner](https://toolsg.com/en/hidden-character-cleaner), or compare two drafts with the [text diff](https://toolsg.com/en/text-diff).

## Frequently asked questions

**What is a Markdown previewer?**

A Markdown previewer renders formatted output from Markdown source text while you edit. It helps you catch structure and readability issues before you publish or commit the final content.

**Does this tool send my Markdown to a server?**

No. This tool renders the preview in your browser so your draft stays on your device unless you choose to copy it somewhere else.

**Can I preview code blocks with triple backticks?**

Yes. Fenced code blocks wrapped in triple backticks are rendered in a dedicated code container so commands and snippets stay easy to read.

**Does the preview execute raw HTML?**

No. Raw HTML is escaped before supported Markdown rules are applied, which keeps the preview safer and reduces the risk of script execution in the page.

**Will this look exactly like GitHub Markdown?**

Not always. The tool is designed around common Markdown patterns, but platforms such as GitHub may add extra extensions, styles, or parsing rules.

**Can I use this for README files and pull request descriptions?**

Yes. It is well suited for drafting README files, issue reports, release notes, changelogs, and pull request descriptions before you paste them into another tool.

**Why are some links not clickable in the preview?**

Links with unsupported or unsafe URL schemes are intentionally not rendered as clickable anchors. That keeps the preview safer and avoids misleading output.

**Does this preview support headings, lists, quotes, and inline code?**

Yes. The tool supports common structural Markdown elements such as headings, ordered and unordered lists, blockquotes, inline code, emphasis, and fenced code blocks.


## Sources

- [CommonMark Spec, version 0.31.2](https://spec.commonmark.org/0.31.2/) — Reference behaviour for headings, lists, emphasis, code, raw HTML and line breaks.
- [GitHub Flavored Markdown Spec](https://github.github.com/gfm/) — Adds tables, task lists, strikethrough and extended autolinks on top of CommonMark.
