Markdown 语法速查 —— 每条规则旁边带实时预览,含 GFM 和各种方言。
- 本地处理
- 分类 开发运维
- 适合 格式化、校验、压缩或检查和代码相关的文本。
基础 (11)
一级标题
# Heading 1
一级标题。ATX 风格,前面一个 `#`。
Heading 1
二级标题
## Heading 2
段落标题。
Heading 2
三级标题
### Heading 3
子段落标题。最多 6 级(`######`)。
Heading 3
Setext 标题
Big title ========= Smaller title -------------
另一种标题写法:`===` 下划线表 H1,`---` 表 H2。
注意: Only H1 and H2 supported in Setext form.
Big title
Smaller title
段落
A paragraph is just text with a soft wrap. Blank line starts new paragraph.
空行分隔的纯文本就是段落。
A paragraph is just text with a soft wrap.
Blank line starts new paragraph.
加粗
**bold text** or __bold text__
用两个 `*` 或两个 `_` 包起来。
bold text or bold text
斜体
*italic* or _italic_
单个 `*` 或 `_`。词中间最好别用 `_`,容易踩坑。
italic or italic
加粗 + 斜体
***bold italic*** or **_mixed_**
三个 `*`,或 `**` 与 `_` 组合。
bold italic or mixed
分割线
--- or *** or ___
单独一行三个以上 `-`、`*` 或 `_`。
or
or
换行
line one line two
行尾加两个空格强制段内换行。
注意: Or use a `\` backslash at end of line.
line one line two
转义
\*literal asterisks\* and \_underscores\_
在特殊字符前加反斜杠,按字面渲染。
\literal asterisks\ and \underscores\
列表 (4)
无序列表
- apple - banana - cherry
`-`、`*` 或 `+` 后接空格。
- apple
- banana
- cherry
有序列表
1. first 2. second 3. third
数字加 `.`。其实全写 `1.` 也行,渲染器会自动编号。
- first
- second
- third
嵌套列表
- top
- nested
- deeper
- back to top嵌套缩进 2 空格(CommonMark)或 4 空格(部分方言)。
- top
- nested
- deeper
- back to top
有/无序混合嵌套
1. ordered - bullet - bullet 2. ordered
不同缩进可混合 `1.` 与 `-`。
- ordered
- bullet
- bullet
- ordered
链接与图片 (7)
行内链接
[Toolora](https://toolora.com)
最常用的形式。文本放 `[]`,URL 放 `()`。
带标题链接
[Toolora](https://toolora.com "Tooltip")
URL 后的引号字符串作为悬浮提示。
引用式链接
Visit [Toolora][site] today. [site]: https://toolora.com "Tooltip"
URL 在别处定义。同一 URL 反复出现或太长时好用。
Visit [Toolora][site] today.
[site]: https://toolora.com "Tooltip"
自动链接
<https://toolora.com> or <hi@toolora.com>
裸 URL 或邮箱用 `<>` 包起来,自动变可点击。
https://toolora.com or <hi@toolora.com>
图片

类似链接,前面加 `!`。`alt` 在图加载失败时显示。

带标题图片

引号里的标题作为悬浮提示。

引用式图片
![logo][img] [img]: https://toolora.com/logo.png
图片的引用式写法,与引用式链接结构相同。
![logo][img]
[img]: https://toolora.com/logo.png
代码 (6)
行内代码
Run `npm install` then go.
反引号包起来。
Run npm install then go.
含反引号的行内代码
Use `` `code` `` if your code contains a backtick.
双反引号包裹,内部可含单个反引号。
Use ` code ` if your code contains a backtick.
围栏代码块
``` const x = 1; console.log(x); ```
单独一行三个反引号,前后包裹多行代码。
const x = 1;
console.log(x);带语言的代码块
```js const x = 1; console.log(x); ```
在开头围栏后写语言名,启用语法高亮。
const x = 1;
console.log(x);波浪号围栏代码
~~~python
print("hi")
~~~`~~~` 是另一种围栏写法。代码里要写三个反引号时好用。
print("hi")缩进代码块
Normal paragraph.
indented 4 spaces
is a code block缩进 4 空格(或 1 个 Tab)。老语法,推荐用围栏。
Normal paragraph.
indented 4 spaces is a code block
表格 (4)
基础表格
| Name | Age | | ---- | --- | | Alice | 30 | | Bob | 25 |
用管道符分列,必须有分隔行。
注意: GFM extension. CommonMark does not include tables.
| Name | Age |
|---|---|
| Alice | 30 |
| Bob | 25 |
对齐表格
| Left | Center | Right | | :--- | :----: | ----: | | a | b | c |
分隔行用 `:` 控制对齐:`:---` 左,`:---:` 居中,`---:` 右。
| Left | Center | Right |
|---|---|---|
| a | b | c |
表格内行内格式
| Name | Link | | ---- | ---- | | **bold** | [site](https://x.com) |
单元格支持行内格式:加粗、斜体、链接、行内代码。
注意: Block content (lists, fenced code) is NOT allowed in pipe-table cells.
| Name | Link |
|---|---|
| bold | site |
单元格内管道符
| Name | Code | | ---- | ---- | | or | a \| b |
`\|` 表示字面管道符。
| Name | Code |
|---|---|
| or | a | b |
块引用 (3)
块引用
> This is a quote. > Wrapped onto a second line.
每行前面加 `>`。
This is a quote. Wrapped onto a second line.
嵌套块引用
> Outer quote > > Inner quote > back to outer
`> >` 表嵌套。
Outer quote > Inner quote back to outer
引用内含格式
> ## Quoted heading > > Paragraph with **bold**. > > - list item
块引用内可包含任何 Markdown 块级元素。
## Quoted heading Paragraph with bold. - list item
HTML (4)
行内 HTML
Press <kbd>Ctrl</kbd>+<kbd>C</kbd> to copy.
行内 HTML 标签原样透传。
Press <kbd>Ctrl</kbd>+<kbd>C</kbd> to copy.
块级 HTML
<details> <summary>Click to expand</summary> Hidden content. </details>
块级 HTML 原样透传。常用于 `<details>`、`<table>`。
注意: Many renderers sanitize away <script>, <style>, <iframe>, on* handlers.
Click to expand
Hidden content.
</details>
HTML 注释
<!-- This is a comment, not rendered. -->
HTML 注释会被剥掉,不渲染。常用作 TODO 标注。
上下标
H<sub>2</sub>O and E = mc<sup>2</sup>
Markdown 没有原生写法,用 `<sub>` 和 `<sup>`。
H<sub>2</sub>O and E = mc<sup>2</sup>
GFM 扩展 (7)
删除线
~~struck through~~
两边各两个 `~`。GFM 扩展。
注意: Not in CommonMark spec — GFM/GitLab/Bitbucket all support.
struck through
任务列表
- [ ] todo - [x] done - [ ] another
`- [ ]` 未完成,`- [x]` 已完成。GFM 扩展。
注意: GitHub/GitLab/Bitbucket render checkboxes; CommonMark renders as text.
- todo
- done
- another
GFM 自动链接
Just paste https://toolora.com — GFM auto-links.
GFM 扩展:裸 URL 不需要 `<>` 也自动变链接。
注意: CommonMark requires `<>`. GitHub/GitLab/Bitbucket auto-link without.
Just paste https://toolora.com — GFM auto-links.
脚注
Here is a claim.[^1] [^1]: Citation goes here.
行内引用 + 文末脚注定义。GFM/GitLab 支持。
注意: CommonMark does not include footnotes. Bitbucket does not support.
Here is a claim.[^1]
[^1]: Citation goes here.
GitHub @ 提及
cc @octocat please review
`@user` 自动变成用户链接。仅 GitHub 支持。
cc @octocat please review
Issue 引用
Fixes #42 and closes owner/repo#7
`#123`、`owner/repo#123` 自动链到 issue。GitHub/GitLab 支持。
Fixes #42 and closes owner/repo#7
Emoji 短码
I :heart: Markdown :sparkles:
`:名称:` 渲染为 emoji。GitHub 专属。
注意: Renders literally on non-GitHub viewers.
I :heart: Markdown :sparkles:
方言 (7)
CommonMark
# Heading Paragraph with [link](url) and `code`.
最严格的基线规范。无表格、无任务列表、无删除线、无脚注。
Heading
Paragraph with link and code.
GitHub Flavored Markdown
CommonMark + tables + task lists + ~~strike~~ + autolinks + emoji + @mentions + #refs
CommonMark 超集。增加表格、任务列表、删除线、自动链接、emoji、@ 提及、#issue 引用。
CommonMark + tables + task lists + strike + autolinks + emoji + @mentions + #refs
GitLab Flavored Markdown
GFM + math via $...$ + diagrams + video/audio embeds
GFM 超集。增加 `$...$` 数学公式、mermaid 流程图、视频音频嵌入、MR 引用。
GFM + math via $...$ + diagrams + video/audio embeds
Bitbucket Markdown
CommonMark base + anchor prefix: #markdown-header-my-heading
接近 CommonMark。锚点用 `markdown-header-` 前缀,GFM 风格的文档内链接会失效。
CommonMark base + anchor prefix: #markdown-header-my-heading
标题锚点链接
See [Setup](#setup) below. ## Setup
标题自动生成 `id` slug,用 `#slug` 链接。各家 slug 规则不同。
See Setup below.
Setup
视频嵌入(GitLab)

GitLab 把视频格式渲染为 `<video>` 播放器。GitHub/Bitbucket 会渲染成坏图。
数学公式(GitLab)
Inline: $E = mc^2$
Block:
```math
\sum_{i=1}^n i = \frac{n(n+1)}{2}
```GitLab 支持 `$...$` 行内与 ` ```math ` 块。GitHub 从 2022 起也支持 `$...$`。
Inline: $E = mc^2$
Block:
\sum_{i=1}^n i = \frac{n(n+1)}{2}这个工具能做什么
免费在线 Markdown 语法速查表,50+ 条规则全部配实时预览 —— 左边是 你需要写的源码,右边立刻看到渲染效果,再也不用复制到别处试。 覆盖:标题 / 加粗 / 斜体 / 删除线 / 有序与无序列表 / 嵌套列表 / 任务列表 / 行内链接 / 引用式链接 / 自动链接 / 图片 / 行内代码 / 围栏代码块(含语言提示)/ 表格(含对齐)/ 块引用 / 分割线 / 原始 HTML 嵌入 / 脚注 ——每条规则都标注 CommonMark、GitHub Flavored Markdown、GitLab、Bitbucket 这四种主流方言的支持情况,方言之间那些 让人抓狂的小差异(GFM 多了任务列表 / 删除线 / 自动链接 / 表格; GitLab 多了视频嵌入和数学公式;Bitbucket 的锚点前缀是 `markdown-header-`)都明确标出。点"复制"一键拷贝任意规则源码。 支持顶部搜索和分类筛选。100% 浏览器本地处理,不上传文档。
工具细节
- 输入
- 数值 + 结构化内容
- 页面会根据工具类型展示文本框、数值控件、文件选择或结构化输入。
- 输出
- 即时结果 + 复制 + 预览
- 结果区优先给出可操作结果,支持项会显示复制、下载或可视化预览。
- 隐私
- 浏览器本地处理
- 主工具逻辑未发现外部 API 调用,输入通常留在当前标签页内处理。
- 保存 / 分享
- 免账号使用
- 打开页面即可使用;刷新后是否保留结果取决于具体工具。
- 性能预算
- 首屏 JS ≤ 22 KB
- 没有声明 WASM 依赖,适合快速打开和移动端使用。
- 适用场景
- 开发运维 · 程序员
- 分类和职业标签用于推荐相关工具、组织内链,并帮助用户快速判断是否适合当前任务。
怎么用
-
1. 输入
把内容粘贴或拖入工具面板。
-
2. 处理
点击按钮,在浏览器内本地处理,文件不上传。
-
3. 复制 / 下载
一键复制结果或下载到本地。
Markdown 速查表 适合怎么用
适合穿插在写代码、查问题、做 Review、上线前的小任务里。
适合开发场景
- 格式化、校验、压缩或检查和代码相关的文本。
- 把片段整理好再放进文档、工单、提交或交接材料。
- 不切换工具,快速检查一个小 payload。
开发检查项
- 压缩、混淆这类不可逆处理,先对副本操作。
- 除非确认工具本地处理,不要粘贴密钥和敏感片段。
- 转换后的代码上线前,仍要跑自己的测试或 lint。
下一步可以接着做
这些入口会把当前任务接到更完整的工具链里。
常见问题
类似工具组合
做你这行的人, 还会一起用这些。