tigtools

Markdown Preview

Type or paste Markdown on the left and see it rendered next to it. The preview is sandboxed, so scripts in the text never run.

Runs in your browser No sign-up

Show

How to use it

  1. Type Markdown in the editor or press “Try an example” to load a document with tables and a task list.
  2. Watch the preview update as you type. Switch to “HTML source” to see the generated markup.
  3. Turn GitHub Flavored Markdown or single-line breaks on or off to match where the text will be published.
  4. Copy the HTML into a CMS or email, or download the result as an .html or .md file.

How it works

Markdown is converted with marked, a widely used open-source parser that follows the CommonMark specification and, with the GFM option on, GitHub Flavored Markdown: pipe tables with column alignment, task lists, ~~strikethrough~~ and automatic links for bare URLs. Footnotes, math and Mermaid diagrams are not part of these specifications and are shown as plain text.

Markdown may contain raw HTML, and that HTML is passed through unchanged, as most Markdown renderers do. To keep you safe, the preview is never inserted into this page. It is rendered inside a sandboxed frame that is not allowed to run scripts, submit forms, open pop-ups or access this site, and its content security policy blocks scripts, external stylesheets, fonts and frames. A <script> tag or an onclick attribute in your Markdown is displayed in the HTML source but never executed. Links in the preview are shown but do not open; copy the URL if you need to follow one.

The preview uses a neutral stylesheet similar to common README renderers; your website or GitHub may style the same HTML differently. The copied HTML is the bare fragment without styles; the downloaded .html file adds a basic stylesheet so it looks like the preview. Downloaded or copied HTML is not sanitised, so if it contains scripts, they will run wherever you paste or open it.

Examples

Checking a README before pushing

Paste README.md to check that the table columns line up, the task list renders as checkboxes and the code blocks are fenced correctly, before the file goes to GitHub.

Writing for a CMS that accepts HTML

Draft a blog post in Markdown, then press “Copy HTML” and paste the <h2>, <p> and <ul> markup into the CMS's HTML editor.

Chat-style line breaks

Text from a chat app has lines separated by single line breaks. Turning on “Treat single line breaks as <br>” keeps those lines apart instead of joining them into one paragraph.

Frequently asked questions

Is it safe to paste Markdown from an unknown source?

Yes, for previewing. The rendered HTML is shown in a sandboxed frame with scripts disabled, so even a <script> tag or an event handler in the text does nothing here. Be careful where you paste the exported HTML, because it is not sanitised.

Why do my images not appear?

Images from other websites are blocked by default so that the preview makes no network requests. Turn on “Load images from other websites” to show them. Relative paths such as ./docs/screenshot.png cannot work because the files are not here.

Does it support footnotes, math or diagrams?

No. It supports CommonMark and GitHub Flavored Markdown (tables, task lists, strikethrough, autolinks). Footnotes, LaTeX math and Mermaid diagrams are extensions that this preview leaves as plain text.

Why does a single line break not start a new line?

In standard Markdown, a single line break inside a paragraph is treated as a space. End the line with two spaces, leave an empty line, or turn on “Treat single line breaks as <br>”.

Privacy

Markdown is converted in your browser and is not uploaded or stored. The preview loads nothing from the internet unless you allow images from other websites; then those images are requested directly from their hosts.