LocalExcelTool
Get started

Markdown Toolkit

Render Markdown to HTML or extract a table of contents from headings.

Runs in your browserNo account neededFree

What is Markdown Toolkit

This Markdown toolkit converts Markdown into standard HTML, and can also extract headings into a table of contents. Headings inside code blocks are never mistaken for real headings. Built on the marked library; all processing runs locally in your browser.

🔒 Everything runs in your browser. Nothing is uploaded.

What this tool actually does with your file

Where it runs
In your browser, on this page
Upload
None — the file never leaves your device
Offline
Works with the network disconnected

CommonMark first, extensions second

The baseline is CommonMark: headings, emphasis, links, lists, block quotes, fenced code, indented code. Everything beyond that — tables, strikethrough, task lists, autolinks — is a GitHub-flavoured extension and is only rendered if the implementation enables it.

This is why the same source renders differently on two sites. A table that shows correctly on GitHub can appear as a paragraph of pipes in a strict CommonMark renderer. When publishing somewhere unfamiliar, check the table and footnote syntax first; those are the two extensions most often missing.

Whitespace is syntax, so formatting can break meaning

Two trailing spaces mean a hard line break; four leading spaces mean a code block; a blank line inside a list item changes whether the following paragraph belongs to the item. A formatter that trims trailing whitespace silently removes every hard break in the document.

Nested list indentation is the other fragile area: two spaces, four spaces or a tab each produce different structures in different parsers. Normalising to a single convention is only safe if the target renderer agrees with it — otherwise the outline depth changes.

Embedded HTML and escaping

Most renderers pass raw HTML through, so a stray < in prose — 'x < y' — can start a tag and swallow the rest of the line. Escaping it as &lt; is the fix, and it is the most common cause of a paragraph disappearing from rendered output.

Escaping also affects characters that are syntax only in context: an asterisk in the middle of a word, an underscore inside an identifier, a leading # in a shell snippet. Fenced code blocks avoid all of it, which is the reason to fence anything that looks like code rather than indenting it.

How to use it

  1. 1.Paste your Markdown
  2. 2.Pick a mode (render / TOC)
  3. 3.Run and copy the result

How Markdown Toolkit works under the hood

Formatters parse your input into a structure, then serialise it back with consistent indentation. That is why a formatter can also reveal a syntax error: if it cannot parse, it cannot print.

  1. 1

    Parse into a tree

    JSON goes through JSON.parse; YAML, XML, CSS and SQL use their own parsers. The parse either succeeds with a structure or fails at a line and column.

  2. 2

    Serialise with a fixed style

    Indentation width, key order and quoting are applied deterministically, so formatting the same input twice gives identical bytes.

  3. 3

    Show the error position

    When parsing fails, the message includes the position so the fix is obvious instead of guessed.

  4. Processing pipeline

Formatting is not validation

A formatter proves the document is syntactically parseable. It does not prove it is valid against a schema, and it does not check business rules. JSON with a duplicated key parses fine and silently keeps the last value.

What gets normalised

Comments are preserved in CSS and SQL but not in JSON, which has no comment syntax. YAML anchors may be expanded, and quote style may change. Keep the original when exact byte layout matters, such as signed payloads.

Verify it yourself

Formatting is deterministic and local — run it twice and compare.

  1. 1.Open DevTools on this page and switch to the Network tab
  2. 2.Keep the filter on Fetch/XHR and run the tool
  3. 3.Confirm no request carries your file — you should see only page assets and fonts

Frequently asked questions

Which Markdown syntax is supported?

CommonMark standard — headings, lists, tables, code blocks, links and more.

Why use the TOC mode?

It shows the heading structure at a glance and never picks up '#' lines inside code fences.

What this kind of conversion cannot keep

Formatters parse the input into a tree and print it back with consistent indentation. If the input is invalid, you get the parser's error position instead of a silently mangled file — malformed JSON stays malformed rather than being «repaired» into something that is no longer yours.

More in Format