Markdown Preview & Formatter
Convert a limited, safe Markdown subset into normalized formatting and an HTML preview. Not a full CommonMark/GFM implementation. Runs entirely in your browser.
Calculator
HTML Preview
Formatted Markdown
—
Characters
—
Headings
—
Links
—
Code Blocks
—
Result
—
How Markdown Preview & Formatter Works
A limited, safe Markdown subset — not full CommonMark/GFM
This tool intentionally supports a practical subset of Markdown: headings, paragraphs, unordered and ordered lists, blockquotes, fenced code blocks, horizontal rules, and inline bold/italic/code/links. It does not claim compatibility with the full CommonMark specification or GitHub Flavored Markdown — no tables, no nested lists, no footnotes, no task lists, no strikethrough, no raw HTML passthrough. This is a deliberate scope decision, not an oversight: a small, well-understood subset is easier to keep genuinely safe than a sprawling implementation chasing every edge case of the full spec.
What is Markdown?
Markdown is a lightweight markup syntax for formatting plain text — instead of clicking a "Bold"
button, you type **bold**; instead of an HTML <h1> tag, you type
# Heading. It was designed to be readable even in its raw, unrendered form, and to convert
cleanly to HTML.
Why Markdown is Popular
Markdown has become the default formatting syntax for README files, GitHub/GitLab comments and pull requests, static site generators, note-taking apps, and countless developer tools — precisely because it's fast to write, readable without rendering, and doesn't require a specific editor or toolchain. Nearly every developer touches Markdown regularly, whether or not they think of it as "using Markdown."
Markdown Syntax
This tool's supported subset, summarized:
| Syntax | Produces |
|---|---|
# through ###### | Heading levels 1–6 |
- item / * item / + item | Unordered list item |
1. item | Ordered list item |
> text | Blockquote |
```lang ... ``` | Fenced code block |
--- | Horizontal rule |
**bold** or __bold__ | Bold text |
*italic* or _italic_ | Italic text |
`code` | Inline code |
[label](url) | Link (safe schemes only) |
Headings
A line starting with 1–6 # characters becomes a heading of that level — one
# for the top-level title down to six for the smallest sub-heading. This tool normalizes
spacing automatically, so #Title (no space) becomes # Title in the
formatted output.
Lists
Unordered list items can start with -, *, or + — this tool
normalizes all three to - in the formatted output for consistency. Ordered list items keep
their original numbers exactly as written; this tool doesn't renumber them, since that could change
what the list is meant to convey.
Links
Only http, https, and mailto links are ever turned into a
real, clickable link. Any other scheme — including javascript:, data:,
and vbscript: — is rendered back as plain, inert text instead of becoming an anchor.
This is a deliberate, permanent security rule; see Markdown Security below.
Code Blocks
Fenced code blocks (triple backticks) preserve their content exactly, character for character — no reformatting, no re-indenting, no inline-markdown processing inside them. Their content is always HTML-escaped before display, so a code sample containing something that looks like a tag or a script displays as literal text rather than being interpreted as markup.
Markdown vs HTML
Markdown is a lightweight syntax that gets converted into HTML for display; HTML is the actual markup language browsers render. Markdown supports far less than HTML can express, but that's exactly the appeal: a constrained syntax is faster to write and impossible to get catastrophically wrong the way malformed HTML can be. This tool takes that idea further for safety's sake — it doesn't just avoid generating unsafe HTML, it refuses to interpret ANY raw HTML present in your input at all; see Markdown Security below.
Common Mistakes
- Forgetting a space after a heading's
#.#Titlewithout a space isn't recognized as a heading by every Markdown implementation; this tool normalizes it, but it's worth writing correctly by habit. - Mixing list marker styles inconsistently.
-,*, and+all work, but mixing them within one list is visually inconsistent — this tool normalizes everything to-. - Assuming raw HTML will render. This tool never interprets raw HTML in your
input — an embedded
<div>or<script>always displays as literal text, by design. - Expecting full CommonMark/GFM features. Tables, nested lists, footnotes, task lists, and strikethrough are outside this tool's deliberately limited subset.
Markdown Security
Rendering user-supplied Markdown into HTML is a genuine security surface if done carelessly — this tool's entire design is built around avoiding that. Three concrete rules govern every render:
- Raw HTML is never interpreted as markup. A literal
<script>in your input becomes the escaped text<script>in the preview — it is never parsed as an actual element, and can never execute. - Links use a strict scheme allow-list. Only
http,https, andmailtolinks become real anchors. Ajavascript:,data:, orvbscript:link — or any other unrecognized scheme — is rendered back as plain escaped text instead, exactly as written, never as a clickable link. - Nothing is ever fetched, executed, or loaded. This tool makes no network requests, loads no remote images or scripts, processes no files, and never executes any code found in a fenced code block. It is a pure text-to-text and text-to-HTML-string transform.
Related Tools
Working with Markdown often overlaps with other developer utility tasks: escape HTML entities directly with the HTML Encoder / Decoder, reformat a JSON payload with the JSON Formatter, beautify a YAML config with the YAML Formatter & Validator, clean up an XML document with the XML Formatter & Validator, validate a pattern used inside your Markdown with the Regex Tester, or fingerprint a document's contents with the Hash Generator.
Accuracy & Sources
Last reviewed: August 2026. Formula source: Original Markdown syntax (Gruber, 2004) — a limited practical subset. All calculations run in your browser. No data is sent to any server.
Frequently Asked Questions
No — it supports a deliberately limited, practical subset: headings, paragraphs, lists, blockquotes, fenced code blocks, horizontal rules, and inline bold/italic/code/links. Tables, nested lists, footnotes, task lists, and strikethrough are outside this tool's scope. This is a scope decision made for safety and simplicity, not an oversight.
Yes, by design. Raw HTML in your input is never interpreted as markup — it always displays as literal, escaped text. Links only become real anchors if they use http, https, or mailto; any other scheme (including javascript: and data:) is rendered back as plain text instead. Nothing is ever executed, fetched, or loaded.
By design — this tool never interprets raw HTML found in your Markdown input. A literal <script> tag displays as the escaped text "<script>" in the preview, exactly as you typed it, and is never treated as an actual HTML element or executed.
Only links using the http, https, or mailto schemes are turned into real anchors. If your link uses a different or unrecognized scheme (like javascript: or data:), it's rendered back as the original plain text instead — a deliberate, permanent security rule, not a bug.
No — code block content is always displayed as plain, escaped text and is never executed, evaluated, or syntax-highlighted using any dynamic execution. It's purely for display.
Conservative normalization only — consistent heading spacing, unordered list markers normalized to "-", consistent blank-line spacing between blocks, and exact preservation of fenced code content. It never rewrites your prose or attempts any transformation that could change what your Markdown means.