Skip to content
Codoryn Search tools

Markdown Editor & Preview

Write or paste Markdown and preview it instantly — parsed locally and sanitised before anything is displayed.

Which Markdown this is

Codoryn renders GitHub Flavored Markdown (marked 18, GFM enabled). That means the CommonMark core plus the GitHub extensions: tables, strikethrough, task lists, autolinks and fenced code blocks.

Flavors differ, and Codoryn does not pretend otherwise. Footnotes, definition lists, admonition blocks, Markdown-in-HTML and math typesetting are not supported in v1, so a document relying on them will render those parts as plain text rather than silently guessing.

How the preview is kept safe

Markdown is allowed to contain raw HTML, which makes any preview a potential cross-site-scripting surface. Codoryn treats every document as untrusted.

  1. Your source is parsed in a Web Worker, which has no access to the page.
  2. The resulting HTML is sanitised against a strict allowlist before it touches the document.
  3. Scripts, event handlers, javascript: URLs, iframes, embedded objects, inline styles, SVG and MathML are removed.
  4. Links are given rel="noopener noreferrer" so a preview link can never reach back into this page.
  5. If sanitisation cannot be completed for any reason, nothing is rendered at all. There is deliberately no fallback that would display unsanitised HTML.

Remote images are not loaded

Image tags survive sanitisation but their src is removed, so the preview never fetches anything from the network. Alt text is preserved so the document still reads correctly.

This is a deliberate privacy decision rather than an oversight. Loading a remote image would tell that server you had opened the document, which undermines the point of a tool that promises your content stays on your device.

How to use it

  1. Type or paste Markdown on the left, or press Sample.
  2. The preview updates as you type for normal-sized documents; larger ones render when you press Render or Ctrl/Cmd + Enter.
  3. Use Copy Markdown or Copy HTML depending on which you need — they are different outputs, so they are separate buttons.
  4. Download .md saves your source; Download .html saves the sanitised HTML.

Frequently asked questions

Is my document uploaded?

No. Parsing happens in a Web Worker in your browser and sanitisation happens in the page, and this tool does not send your input over the network.

Why did my raw HTML disappear?

Because it was not on the allowlist. Structural HTML such as tables and emphasis survives; anything that can execute, load, or restyle the page does not.

Why is the copied HTML different from what I wrote?

You are copying the sanitised output, which is exactly what the preview displayed. That is the honest thing to hand you — copying unsanitised markup would give you something Codoryn itself refused to render.

How large a document can I preview?

Up to 256 KB. Larger documents are refused rather than risking an unresponsive tab.

That figure is measured rather than guessed. Parsing happens in a worker, but sanitising the result and putting it on the page do not, and a document several times this size froze a mid-range phone for seconds. The limit is set where the preview stays responsive on that hardware, not where it merely finishes eventually.

Documents above 128 KB stop previewing as you type; press Render or Ctrl/Cmd + Enter when you want them.

Send output to