M
Markdown
TOOLS
工具箱
文A
在线 Markdown 编辑器
使用工具栏编写 Markdown 并实时预览。无需账号,不上传云端。
文A
B
I
H
Link
Img
</>
❝
•
杂志风
PDF
# Markdown Viewer & Editor: Live Preview, Math, PDF and HTML Export Paste, type, or **drop a `.md` file** into this free online Markdown viewer and watch it render in real time. The preview runs through the same pipeline as **Download HTML** and **Export PDF**, so what you see on screen is exactly what your readers get: no export surprises, no missing checkboxes, no broken footnotes, no garbled formulas. This page is a live tour. Edit it, break it, export it. Every construct below is rendered by the workspace you are looking at. ## Why Choose This Markdown Editor - **Private by default.** No account and no upload. Your Markdown is rendered in your browser and never leaves your machine. - **What you see is what you export.** Preview, PDF, and HTML download share one render pipeline and one theme stylesheet. - **Nine preview styles.** Magazine, Terminal, Newspaper, Soft, Glass, Kindle, Slides, Claude, and HTML. Each has a tunable palette, and the theme travels inside the exported file. - **Accurate math.** LaTeX formulas are typeset with MathJax as you type and exported as self-contained SVG, so readers need neither MathJax nor web fonts. - **One-click output.** Get an A4 PDF, a standalone HTML document, or a clean HTML fragment ready to paste into your site. - **A complete toolbox.** Markdown viewer and editor, Markdown ⇄ HTML converters, a table generator, and a table of contents generator, all powered by the same rendering engine. - **Built for long documents.** Drag-and-drop loading, an outline sidebar that jumps to any heading, and scroll-synced panes. The interface is available in English and 中文. ## Markdown Syntax Cheat Sheet and Showcase Everything below is ordinary Markdown. If it renders here, it renders in your export. Use this section as a quick reference for the full CommonMark and GitHub Flavored Markdown (GFM) syntax. ### Headings Section headings in this document use ATX syntax (`# Hash marks`). Levels 4 to 6 look like this: #### Fourth-level heading ##### Fifth-level heading ###### Sixth-level heading Setext headings use an underline instead of hash marks. The heading right below this paragraph is one: Setext heading with an underline -------------------------------- ### Paragraphs and Line Breaks A paragraph is one or more sentences separated by a blank line. A soft line break inside a paragraph joins the lines with a space. End a line with two spaces to force a hard break, like this line does, or end it with a backslash\ to get the same break without trailing whitespace. ### Emphasis, Strikethrough, and Inline Code *Italic with asterisks*, _italic with underscores_, **bold with asterisks**, __bold with underscores__, ***bold and italic***, and ~~strikethrough~~. Inline code marks paths, commands, and keys, such as `.agents/skills/`, `npm run dev`, or `Ctrl` + `C`. ### Blockquotes > A blockquote is a line or paragraph prefixed with `>`. > > Quotes can contain other blocks, including lists and more quotes: > > > A nested quote with a list: > > > > - one > > - two ### Lists Unordered lists accept three markers: - dash * asterisk + plus Ordered lists keep their numbers and can nest: 1. First item 2. Second item 1. Nested item one 2. Nested item two 3. Third item Lists can be loose, with blank lines between items, like this one: - A loose item - Another loose item Task lists render as real checkboxes: - [x] Render GFM task lists - [x] Export checkboxes to PDF and HTML - [ ] Break the preview (go on, try it) ### Code Inline code is shown above. Indented code blocks use four spaces: def indented(): return "no language tag, still a code block" Fenced code blocks keep their language tag. Backticks: ```js // fenced with backticks and a language tag export function hello(name) { return `Hello, ${name}!`; } ``` Tildes work the same way: ~~~python def hello(name: str) -> str: return f"Hello, {name}!" ~~~ ### Horizontal Rules Three equivalent markers produce a rule: --- `---`, `***`, and `___` all render as the line above. ### Links - Inline link with a title: [Markdown by John Gruber](https://daringfireball.net/projects/markdown/ "Markdown home") - Reference-style link: [CommonMark specification][cm] - Autolink in angle brackets: <https://commonmark.org> - Bare URL (GFM autolink): https://example.com - Link to a heading in this document: [From preview to file](#from-preview-to-file) [cm]: https://spec.commonmark.org/ "CommonMark" ### Images Inline and reference styles both work, and images are carried into PDF and HTML exports: ![Close-up of a yellow flower, reference-style image demo][demo-img]  [demo-img]: https://images.pexels.com/photos/20791127/pexels-photo-20791127.jpeg "Reference-style image" ### Tables GFM tables support column alignment and inline formatting inside cells: | Syntax | Supported | Alignment demo | | :--------- | :-------: | -------------: | | **bold** | yes | right-aligned | | `inline` | yes | right-aligned | | ~~strike~~ | yes | right-aligned | | $E = mc^2$ | yes | math in cells | | `a \| b` | yes | escaped pipe | ### Footnotes Markdown keeps references out of the way, and footnotes are collected at the end of the document. Several references can point to the same note[^1]. ### Backslash Escapes A backslash prints the literal character: \*not italic\*, \_not italic\_, \[not a link\], \# not a heading, \| not a table pipe. ### Inline HTML (Sanitized) A safe subset of raw HTML passes through the pipeline: - Keyboard hints: press <kbd>Ctrl</kbd> + <kbd>S</kbd> - Subscript and superscript: H<sub>2</sub>O and x<sup>2</sup> - A hard break with a tag:<br>this text starts on a new line Anything unsafe, such as scripts, event handlers, or embedded frames, is stripped by the sanitizer. ### Math Formulas with LaTeX Inline math such as $E = mc^2$ and $e^{i\pi} + 1 = 0$ is typeset with MathJax. Display equations are wrapped in `$$ … $$`: $$ \int_{0}^{\infty} e^{-x^2}\,dx = \frac{\sqrt{\pi}}{2} $$ Sums, fractions, and matrices render just as cleanly: $$ \sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6} \qquad A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} $$ Formulas render while you type and export as self-contained SVG. ## From Preview to File Once your document looks right, take it anywhere: - **Export PDF.** The themed preview as a print-ready A4 document. - **Download HTML.** One self-contained file with styles and formulas embedded. - **Copy as HTML.** A clean fragment you can paste straight into a website or CMS. - **Copy or download Markdown.** Keep editing in your favorite editor. ## Frequently Asked Questions ### Is this Markdown viewer free and private? Yes. It is free to use, needs no sign-up, and renders everything locally in your browser. Your documents are never uploaded. ### Does it support GitHub Flavored Markdown? Yes. Tables, task lists, strikethrough, autolinks, fenced code blocks, and footnotes are all supported, along with the complete CommonMark syntax. ### Can I render LaTeX math in Markdown? Yes. Write inline formulas between single dollar signs and display equations between double dollar signs. They are typeset with MathJax and exported as SVG. ### How do I convert Markdown to PDF or HTML? Open or paste your document, pick a preview style, then choose **Export PDF** or **Download HTML**. The output matches the preview exactly. [^1]: Footnotes are auto-numbered, and multiple references may share one note.
输入 Markdown 后在此预览
Markdown 编辑器 – 免费在线 Markdown 编辑器