Layerbit
Runs entirely in your browser

Markdown Editor & Live Preview to HTML

Write GitHub-flavored Markdown with a formatting toolbar and see a live, sanitized preview with tables, task lists and a clickable table of contents, then copy clean HTML or download a styled, self-contained HTML page.

Preview
HTML

    

Markdown in one screen

Markdown is a plain-text format that reads naturally as text and converts cleanly to HTML. It is the format of README files on GitHub and GitLab, of most documentation sites, of notes apps such as Obsidian, and of messages in Slack, Discord and many issue trackers. This editor follows GitHub-flavored Markdown (GFM), the most widely used dialect, which adds tables, task lists, strikethrough and automatic links to the original syntax.

You typeYou get
# Title, ## SectionHeadings, level 1 to 6
**bold**, *italic*, ~~struck~~bold, italic, struck
[text](https://example.com)A link; ![alt](image.png) for an image
- item or 1. itemBulleted or numbered list; indent for nesting
- [ ] todo, - [x] doneTask list with checkboxes
> quotedBlock quote
`code` and fenced ```js blocksInline code and code blocks with a language tag
| a | b | rows with a |---|---| lineA table; colons in the divider set alignment
--- on its own lineA horizontal rule

A single line break inside a paragraph is ignored in standard Markdown, so hard-wrapped text flows as one paragraph; leave a blank line to start a new one, or end a line with two spaces or a backslash to force a break. The "Line breaks" option treats every newline as a break, which is how GitHub renders comments and issues but not README files.

Why the preview is sanitized

Markdown allows raw HTML, so a Markdown document can contain a <script> tag, an onerror attribute on an image or a javascript: link. Rendering untrusted Markdown straight into a page is a classic cross-site scripting hole. This editor converts Markdown with the marked parser and then passes the HTML through DOMPurify, which keeps safe formatting and strips scripts, event handlers and dangerous URLs before anything reaches the page. The copied and downloaded HTML is the same sanitized output, so it is safe to paste into a CMS or an email template. If you build your own Markdown pipeline, sanitize on output in the same way; escaping the input is not enough because Markdown's own syntax produces HTML.

Using the exported HTML

Copy HTML gives you the body fragment: headings with stable id attributes for linking, paragraphs, lists, tables and code blocks, with no styles or scripts, ready for a CMS, a blog engine, an email builder or a documentation template. Download .html page wraps that fragment in a complete, self-contained document with a readable typographic style, a light and dark theme that follows the reader's system setting, and no external requests, which makes it suitable for sending as an attachment, archiving or printing to PDF from the browser. The heading ids follow the same rule GitHub uses (lowercase, spaces to hyphens, punctuation removed), so links like #getting-started written for a README keep working.

Frequently asked questions

Paste or type Markdown into the editor and the HTML is generated as you type. Use Copy HTML for the HTML fragment to paste into a website, CMS or email builder, or Download .html page for a complete styled document. Switch to the HTML view to read the generated markup. The conversion follows GitHub-flavored Markdown, so tables, task lists and strikethrough are included.

Write the header cells separated by pipes, then a divider row of dashes, then one row per line: | Name | Role | on the first line, | --- | --- | on the second, and | Ada | Engineer | below. Colons in the divider set alignment: :--- for left, :---: for centered and ---: for right. The table button in the toolbar inserts a starter table you can edit. The cells do not need to line up in the source.

Yes. Tables, task lists, strikethrough, fenced code blocks with a language tag and automatic linking of bare URLs all render as they do on GitHub, and headings get the same anchor ids GitHub generates. GitHub-specific extensions that need its servers, such as @mentions, issue references, emoji shortcodes and Mermaid diagrams, are shown as plain text.

In Markdown a single newline inside a paragraph is treated as a space, so text wrapped at 80 columns still forms one paragraph. To start a new paragraph leave a blank line; to force a line break within a paragraph end the line with two spaces or a backslash. If you want every newline to become a break, as in GitHub comments, turn on the Line breaks option.

Yes. Raw HTML in the Markdown is passed through DOMPurify before it is displayed or exported, which removes script tags, inline event handlers such as onerror, and javascript: URLs while keeping harmless formatting. The editor itself never runs code from the document, and nothing you type is sent to a server.

It is not uploaded: parsing and rendering happen in your browser and there are no network requests. The draft is not stored either unless you choose Share link from the header, which places it in the link's #fragment so it reaches only the person you send it to. Use Download .md to keep a copy.

Changelog