devtools.cihat.dev

Markdown editor online with live preview

A free online Markdown editor: write on the left, read the result on the right as you type. Copy it as clean HTML, or save it as a .md or a standalone .html file. No sign-up.

Preview

Your text is kept only in this browser’s storage, on this device.

How to use it

  1. Write or paste Markdown. The toolbar and Ctrl/⌘ + B, I, K add bold, italic and links.
  2. The preview follows as you type, with GitHub Flavored Markdown: tables, task lists, strikethrough and alerts. The word and character count updates with it.
  3. Press Copy HTML to paste into a CMS or an e-mail, Copy Markdown for a README, or save the file. Your text stays in this browser between visits.

Markdown in one table

Markdown was published by John Gruber in 2004 as a way to write for the web in plain text that reads well even before it is rendered. The syntax you will use nine times out of ten:

You typeYou get
# Title to ###### TitleHeadings, levels 1 to 6
**bold**, _italic_, ~~struck~~bold, italic, struck
[text](https://example.com)A link
![alt](image.png)An image
- item or 1. itemA bulleted or numbered list; indent to nest
- [ ] task, - [x] doneA checkbox, empty or ticked
> quoteA block quote
`code`Inline code
Three backticks on their own lines, with a language nameA code block
--- on its own lineA horizontal rule

What GitHub Flavored Markdown adds

The original Markdown left many cases open, so CommonMark wrote an exact specification. GitHub Flavored Markdown (GFM) is CommonMark plus five extensions: tables, task list items, strikethrough, extended autolinks (a bare www.example.com becomes a link) and a filter that disallows some raw HTML tags. This editor renders GFM with the marked library, so a README that looks right here looks the same on GitHub in almost every case.

A table needs a header row and a separator row. Colons in the separator set the alignment:

  • | Name | Price | is the header row.
  • |:--|--:| aligns the first column left and the second right; :-: centres.
  • | Tea | 3 | and the rows after it are the body. The outer pipes are optional, and the columns do not have to line up in the source.

Alerts, line breaks and other GitHub habits

Alerts. GitHub turns a block quote that starts with [!NOTE], [!TIP], [!IMPORTANT], [!WARNING] or [!CAUTION] into a coloured callout. The preview here does the same, so you can check one before you push. GitHub’s own guidance is to use them sparingly: one or two per document, never back to back, and they cannot be nested.

Line breaks. In issues, pull requests and discussions, GitHub turns every new line into a line break. In a .md file it does not: two lines with no blank line between them join into one paragraph. To break a line inside a paragraph, end it with two spaces, a backslash or <br>. This editor follows the .md file rule, so what you see here is what a README shows. A blank line starts a new paragraph.

Heading links. Every heading gets an anchor, so [Install](#install) jumps to the Install section. To build a contents list from your headings, use the table of contents generator.

Clean, safe HTML

The HTML you copy comes from the same rendering as the preview, with one difference: alerts are copied as plain block quotes. It is GFM rendered with marked, then cleaned with DOMPurify, so scripts, event handlers, inline styles, iframes and forms pasted into the Markdown never reach the output. Simple HTML such as <details>, <kbd> and <sup> is kept. External links open in a new tab.

Save .html writes a complete page with a plain, readable style; open it in any browser and print it to get a PDF. Save .md keeps the source.

What this editor does not do

Footnotes ([^1]), math between dollar signs and Mermaid diagrams are shown as plain text, not rendered. There is no sync between devices: the text is kept in this browser’s local storage only, so it is gone if you clear site data. For a long document with many tables, the table generator is faster than typing pipes, and the README preview loads a real repository’s README with its images and relative links resolved.

Questions people ask

Is there a free online Markdown editor with preview?

This one. It runs in your browser, needs no account, shows a live preview side by side and exports HTML, .md and standalone .html.

How do I convert Markdown to HTML?

Paste the Markdown and press Copy HTML, or Save .html for a complete page you can open in any browser.

Is my text saved?

Only in this browser’s local storage on your device, so it is there when you come back. Nothing is sent to a server. Clear removes it.

Does it support GitHub Flavored Markdown?

Yes: tables, task lists, strikethrough, autolinks, fenced code and the > [!NOTE] style alerts.

How do I make a line break in Markdown?

End the line with two spaces, a backslash or <br>. A plain new line joins the two lines in a .md file; a blank line starts a new paragraph.

Can I export Markdown to PDF?

Save .html, open it in your browser and print to PDF. The page uses a plain, readable style for that.

Does it work on a phone?

Yes. On a narrow screen the preview sits below the editor instead of beside it.