Markdown Editor

Write Markdown on the left and see a live preview on the right. Supports GitHub-flavored Markdown, tables, task lists, and fenced code blocks with syntax highlighting.

Markdown
Preview


Online Markdown Editor — Write and Preview Markdown with Live HTML Output

Markdown is one of those tools that seems almost too simple when you first encounter it — just a few punctuation conventions that turn plain text into formatted content. A # before a line makes it a heading. Two asterisks around a word make it bold. A hyphen at the start of a line makes it a list item. But the simplicity is the point. Markdown was designed by John Gruber and Aaron Swartz in 2004 with a specific goal: create a format that reads naturally as plain text but can be mechanically converted to clean HTML. It succeeds at both. A raw Markdown file is readable and navigable in any text editor. The same file rendered by any Markdown parser becomes properly formatted HTML that looks exactly like you'd expect it to.

This online Markdown editor gives you a live split-pane interface: write Markdown on the left, see the formatted HTML preview update in real time on the right. It supports GitHub-Flavored Markdown (GFM) — the extended Markdown specification that adds tables, task lists, strikethrough, fenced code blocks with language identifiers for syntax highlighting, and autolinked URLs. The rendered HTML is sanitized with DOMPurify to prevent XSS, and code blocks use Prism for syntax highlighting. Your draft is auto-saved to browser localStorage — nothing is ever transmitted to any server.

Where Markdown Is Used — and Why It's Worth Learning

Markdown is everywhere in software development and technical writing, and learning it pays dividends across a wide range of tools and platforms:

GitHub, GitLab, and Bitbucket: All three platforms render Markdown natively throughout their interfaces. README files, wiki pages, pull request descriptions, issue comments, and code review comments all support Markdown. Writing clearly formatted issues and pull request descriptions — with code blocks, lists, and headings — is a professional expectation in most open source and team development contexts.

Documentation platforms: MkDocs, Docusaurus, ReadTheDocs, and VitePress build entire documentation websites from Markdown files. These tools let teams write documentation in plain text files alongside code, in the same repository, with the same version control workflow as the codebase itself. The documentation becomes part of the project rather than a separate artifact maintained elsewhere.

Static site generators: Jekyll, Hugo, Eleventy, Gatsby, and Astro all use Markdown as their primary content format. Blog posts, landing pages, and documentation pages are written as .md files and the generator converts them to HTML at build time. This approach keeps content in a human-readable, version-controlled format entirely separate from the presentation layer.

Note-taking and knowledge management: Obsidian, Notion, Bear, Typora, and many other note-taking tools store notes as Markdown files or render Markdown natively. Notes written in Markdown are not locked into any application — open the .md files in any text editor and they're fully readable and portable.

Communication tools: Slack, Discord, Reddit, Stack Overflow, and Discourse all support Markdown subsets for formatting messages and posts. The exact subset varies by platform, but the core syntax — bold, italic, code, links, lists — is consistent.

Complete Markdown Syntax Reference

Headings: Use hash symbols to create headings: # H1, ## H2, ### H3, through ###### H6. The number of hashes determines the heading level. H1 is typically used for the page title; H2–H4 for section and sub-section headings.

Text formatting: Bold wraps text in double asterisks or underscores: **bold** or __bold__. Italic uses single: *italic* or _italic_. Bold italic combines both: ***bold italic***. GFM adds strikethrough: ~~strikethrough~~.

Links and images: Inline links use [link text](URL). Reference-style links separate the URL for cleaner source text: [link text][ref] and then [ref]: URL elsewhere in the document. Images follow the same syntax with an exclamation mark prefix: ![alt text](image-url).

Lists: Unordered lists use -, *, or + at the start of each line. Ordered lists use numbers followed by a period: 1., 2.. Nested lists are created by indenting items. GFM task lists use - [ ] for unchecked items and - [x] for checked items — rendered as interactive checkboxes on GitHub.

Code: Inline code wraps in single backticks: `variable`. Fenced code blocks use triple backticks on their own lines, with an optional language identifier after the opening fence for syntax highlighting: ```javascript. The language identifier tells the renderer which syntax highlighting rules to apply.

Blockquotes: Lines starting with > become blockquotes, typically rendered with a left border and indented style. Nested blockquotes use >>.

Tables (GFM): Tables use pipe characters to separate columns and a row of hyphens to separate the header from the body. Column alignment is set with colons in the separator row: |:---| left, |:---:| center, |---:| right.

Horizontal rules: Three or more hyphens, asterisks, or underscores on their own line produce a horizontal divider: ---.

Standard Markdown vs. GitHub-Flavored Markdown

John Gruber's original Markdown specification, published in 2004, defines the core syntax. It was deliberately minimal — headings, lists, code, links, images, blockquotes, and basic text formatting. The specification left many edge cases underspecified, which led to inconsistent behavior across different Markdown parsers.

GitHub-Flavored Markdown (GFM), specified by GitHub in 2017 based on the CommonMark standard, extends the base spec with additional features and resolves many ambiguities. The key additions: fenced code blocks (triple backticks), tables, task lists, strikethrough, autolinked URLs, and disallowed raw HTML tags for security. GFM has effectively become the dominant Markdown dialect for technical writing — most Markdown tools support it or a close variant.

This editor uses GFM-compatible parsing, so what you write here will render consistently with what GitHub and most modern Markdown-aware platforms display.

Frequently Asked Questions About Markdown

Standard Markdown (John Gruber's original spec) covers the basics: headings, bold, italic, links, images, lists, blockquotes, inline code, and code blocks. GitHub-Flavored Markdown (GFM) extends this with tables, task lists (- [ ]), strikethrough (~~text~~), fenced code blocks with language identifiers (```javascript), and autolinked URLs. This editor supports GFM-style features, so your output will closely match what GitHub renders, though minor edge-case differences may exist.
The preview HTML is sanitized with DOMPurify before being displayed, which removes dangerous tags and attributes (like <script>, onclick, javascript: URLs) that could cause XSS. The "Copy HTML" button copies this sanitized output. For personal documents and trusted content, this is safe to use. For user-generated content on a production site, always apply server-side sanitization in addition to any client-side processing — never rely solely on client-side sanitization for security.
Use pipe characters to separate columns and hyphens to define the header separator row. For example:

| Name | Role |
|------|------|
| Alice | Developer |
| Bob | Designer |

Column alignment is controlled by colons in the separator row: |:---| for left, |:---:| for centre, |---:| for right. The toolbar's Table button inserts a starter table template.
Auto-save stores your draft in your browser's localStorage — it stays on your device and is never sent to any server. Only you can access it, and only from the same browser on the same device. The Share button encodes your document in the URL fragment (after the #), which also never goes to the server. Only share links with people you trust, as they contain your full document content. Use Reset or clear site data in your browser settings to remove a saved draft.
Yes, and many popular platforms support it natively. Static site generators like Hugo, Jekyll, Eleventy, and Gatsby take Markdown files as content input and generate full HTML sites. Headless CMS platforms like Contentful, Sanity, and Strapi support Markdown or MDX fields. Ghost and WordPress (with plugins) can render Markdown posts. Write your content in this editor, copy the Markdown or the exported HTML, and paste it into your CMS of choice.
Use a fenced code block with the language identifier immediately after the opening triple backticks:

```javascript
const greeting = 'hello';
```

The editor uses Prism with auto-loading language support, so most common languages (JavaScript, Python, PHP, CSS, SQL, Bash, JSON, YAML, and many more) are highlighted automatically based on the language identifier you specify.
Share links encode your entire document in the URL fragment — your content is never stored on any server, so the URL has to contain everything. Large documents produce very long URLs, which may hit browser or server URL length limits. For long documents, use the Save button to download a .md file and share that file directly via email, cloud storage, or a code repository.