工具 指南
text 免费 无需注册

密码生成器

可视化创建Markdown表格——编辑单元格,添加/删除行和列,设置对齐方式。

正在加载工具…

关于此工具

使用类似电子表格的可视化界面构建Markdown格式的表格。添加行和列,设置每列的对齐方式(左、中、右),并复制格式化的Markdown或HTML输出。支持GitHub风格Markdown。

使用方法

  1. 1 点击单元格直接编辑。
  2. 2 使用"添加行"和"添加列"按钮扩展表格。
  3. 3 点击每个列标题中的对齐图标(← ↔ →)设置对齐方式。
  4. 4 点击"复制Markdown"复制格式化的表格。

What a Markdown table actually looks like

Markdown tables are plain text built from pipe characters (|) and dashes. A table has three parts: a header row, a separator row of dashes that defines the columns and their alignment, and any number of data rows. Hand-writing them is fiddly — one misplaced pipe and the table silently fails to render — so this generator gives you a spreadsheet-like grid to edit, and emits correct GitHub Flavored Markdown (GFM) for you. Here is the structure it produces:

  • | Header 1 | Header 2 | — the column titles
  • | :--- | ---: | — the separator that turns the first row into a header and sets alignment
  • | cell | cell | — one line per data row

How alignment is encoded

The colons in the separator row are the entire alignment mechanism, and this tool writes them for you when you click the arrow in a column header. The mapping is exact:

You chooseSeparator becomesEffect
Left (←):---Text aligned left (the default)
Center (↔):---:Text centered
Right (→)---:Text aligned right, ideal for numbers

Clicking the alignment button cycles left → center → right, and the live preview updates instantly so you can see the colons move.

A worked example

Suppose you build a two-column price list: headers Item and Price, with Price set to right alignment, and one row "Coffee / $3.50". The generator outputs:

  • | Item | Price |
  • | :--- | ---: |
  • | Coffee | $3.50 |

On GitHub, in a README, or in any GFM renderer, that becomes a clean table with the price column flush right. The Copy HTML button instead gives you a full <table> with align attributes on each cell, for places that take HTML rather than Markdown.

The pipe-escaping detail that prevents broken tables

A literal | inside a cell would be read as a column separator and shatter the row. To prevent that, the generator escapes any pipe you type in a data cell to \| when it builds the Markdown — so a cell containing "yes | no" exports safely and renders as intended. This is one of the most common reasons hand-written tables break, and it's handled automatically here. (The separator row is exempt, since its dashes and colons are structural.)

Editing features that save time

  • Inline editing. Click any cell and type; the Markdown preview regenerates on every keystroke.
  • Tab navigation. Press Tab to jump to the next cell, wrapping to the next row at the end — fast for filling a grid by keyboard.
  • Add or remove rows and columns. Buttons grow the table; the small × on each row and column header removes it (the table keeps at least one column and one data row).
  • Import CSV or TSV. Paste comma- or tab-separated text and the tool detects the delimiter (tab wins if any tab is present), treats the first line as headers, strips surrounding quotes, and pads short rows so the grid stays rectangular.

Practical use cases

  • README and documentation tables — feature comparisons, configuration options, API parameters.
  • Pull request and issue descriptions — checklists and small data summaries that render natively on GitHub and GitLab.
  • Converting spreadsheet snippets — paste a block from Excel or Google Sheets (which copies as TSV) straight into the importer.
  • Static-site content — tables in Markdown posts for Jekyll, Hugo, MkDocs, and similar generators.

Common mistakes

  • Omitting the separator row. Without the --- line, renderers don't treat the block as a table at all. This tool always includes it.
  • Mismatched column counts. Every row must have the same number of cells; the importer pads ragged rows for you, but hand edits should keep counts equal.
  • Forgetting that Markdown tables are not for layout. They're for tabular data; cells don't support block elements like lists or multiple paragraphs.
  • Pasting CSV with commas inside quoted fields. The simple importer splits on the delimiter, so a value like "Smith, John" may split; clean such fields after import.

Everything stays on your device

The grid, the Markdown and HTML generation, the pipe-escaping, and the CSV import all run in your browser with plain JavaScript. Nothing you type or paste is uploaded, and copying uses your device's clipboard. The tool works offline once loaded.

常见问题

{# Alpine.js — self-hosted. (The previous jsdelivr CDN tag had a stale SRI integrity hash, so the browser refused to run it and window.Alpine was never defined — silently breaking every FAQ accordion and Alpine tool.) #}