SiteBox

Markdown Editor

Free Online Markdown Editor & Previewer

Create and preview Markdown documents in real-time with syntax highlighting, live preview, and advanced formatting options. Perfect for writers, developers, and content creators.

Words: 0 | Characters: 0 | Lines: 0

Markdown Editor (Fullscreen Mode)

Preview will appear here as you type...

How to Use Markdown Editor

1. Write Markdown

Type your content using Markdown syntax in the left panel. Use the toolbar buttons for common formatting or keyboard shortcuts.

2. Instantly Preview

See your formatted content rendered in real-time in the right panel. Changes appear as you type.

3. Export Your Work

Download your document as Markdown or HTML, or copy HTML to your clipboard for use elsewhere.

Supported Features

  • Syntax highlighting for code blocks in multiple languages
  • Table formatting and editing
  • Mathematical formula rendering using KaTeX
  • Diagram creation with Mermaid.js
  • Task lists rendered as checkboxes
  • Automatic content saving to prevent work loss
  • Completely free with no registration required

A Markdown Cheat Sheet You Can Paste In

Copy this into the editor and compare the source with the preview. It covers almost everything people use day to day:

# Weekly update

**Shipped:** new checkout page
*In progress:* refund flow

- [x] Fix tax rounding
- [ ] Write release notes

| Metric      | Last week | This week |
|-------------|-----------|-----------|
| Sign-ups    | 120       | 134       |

> Blocker: waiting on the payments sandbox.

```python
def total(items):
    return sum(i.price for i in items)
```

[Status page](https://example.com/status)

The table and the task list are GitHub Flavored Markdown (GFM) extensions, which this editor enables. So is the line-break behaviour: here a single line break in the source becomes a line break in the preview, the way GitHub comments work. In strict CommonMark you would need a blank line or two trailing spaces.

(The numbers in the table are placeholder values for the example.)

Maths and Diagrams

Two extras make this editor useful for technical notes:

  • Formulas with KaTeX. Wrap inline maths in single dollar signs, $E = mc^2$, and display maths in double ones, $$\sum_{i=1}^{n} i = \frac{n(n+1)}{2}$$. KaTeX supports most of the LaTeX maths syntax used in papers.
  • Diagrams with Mermaid. A fenced code block tagged mermaid is drawn as a diagram. For example graph LR; Draft-->Review-->Publish becomes a three-box flowchart.

Note that a literal dollar sign in ordinary text (prices, for instance) can be mistaken for the start of a formula. Write \$ to keep it as a plain character.

Where People Use It

  • Drafting a README before committing it, to check tables and code blocks render as expected.
  • Writing documentation or blog posts for static site generators such as Hugo, Jekyll or Astro, which take Markdown files as input. Export MD to save the source.
  • Turning notes into an email or CMS post. Click Copy HTML and paste into an editor that accepts HTML, or Export HTML for a standalone file.

How the Preview Is Built, and Where Your Text Lives

The editor pane is CodeMirror, which provides Markdown syntax colouring and automatic list continuation. As you type, the open-source marked library converts the source to HTML, Prism highlights code blocks (Python, JavaScript, CSS and Java are loaded), KaTeX typesets formulas and Mermaid draws diagrams. All of it runs in your browser.

Your document is autosaved to your browser's local storage, so closing the tab doesn't lose work. Nothing is uploaded. Two consequences: the draft won't follow you to another device or browser, and clearing site data deletes it. Export the .md file for anything you want to keep.

When the Preview Doesn't Look Right

  • A list or heading doesn't render. Markdown needs a space after #, - or 1.: #Title is plain text.
  • A table appears as raw pipes. The header row needs a separator line of dashes beneath it, and every row needs the same number of columns.
  • Underscores in words turn italic. Wrap identifiers like user_id_field in backticks.
  • Pasted HTML runs. Raw HTML in Markdown is passed through to the preview. Only paste HTML you trust, and check exported HTML before publishing it.
  • The exported HTML looks plain elsewhere. Styling and code colours come from this page; the receiving site applies its own CSS.

Need just a word count for a draft? The Word Counter gives sentences, paragraphs and reading time too. To validate a JSON snippet before putting it in a code block, use the JSON Formatter. More in Everyday Tools.

Frequently Asked Questions

Which Markdown flavor does the editor use?

GitHub Flavored Markdown via the marked library, including tables, task lists, strikethrough and single line breaks.

How do I write math formulas?

Use $...$ for inline formulas and $$...$$ for display formulas. They are rendered with KaTeX.

Can I draw diagrams?

Yes. Put Mermaid syntax in a fenced code block labelled mermaid and the preview draws the diagram.

Is my document saved?

It is autosaved in your browser's local storage on this device only. Export it as Markdown to keep a copy.

How do I get HTML out of my Markdown?

Click Copy HTML to copy the rendered HTML, or Export HTML to download it as a file.