Markdown Table Formatter
Align the columns of pasted Markdown tables so the pipes line up. Left, right and center alignment set in the divider row (---:, :---: and :---) are preserved and the divider is regenerated to match. East Asian wide characters count as two columns so tables with CJK text still align, and lines that are not part of a table are left untouched.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Your result will appear here
Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.
How it works
What gets realigned
Paste a Markdown table and every row is re-padded so the pipes sit in one column. Each cell is measured by its display width, the widest value in a column sets the width, and one space is added either side of every pipe. Lines that are not part of a table pass through untouched.
Alignment is read from the divider
The divider row decides each column: :--- is left, :---: is center and ---: is right. Existing markers survive and the divider is rebuilt for the new widths with the same colons, so a right-aligned numeric column stays right-aligned without any extra setting.
Wide characters and escaped pipes
East Asian wide and full-width characters count as two columns, so tables that mix CJK text with Latin still line up in a monospaced view. A literal pipe inside a cell must be written as a backslash followed by |, and the formatter then treats it as content rather than a column break.
What counts as a table here
A table begins at a line whose next line is a valid divider, such as |---|, |:--:| or | -: |, and ends at a blank line or the next divider. A block without that divider is copied verbatim, and the stats line reports how many tables were found and how many lines the output holds.
Local string work, nothing uploaded
Measuring, padding and rebuilding the divider is ordinary string handling in this tab. No table is transmitted to any formatting service, and the tool keeps working offline.
Questions
Does it preserve my column alignment?
Yes. Left, right and center alignment markers in the divider row (---:, :---: and :---) are kept and the divider is regenerated with the same alignment.
How are wide CJK characters measured?
East Asian wide and full-width characters count as two columns, so pipes line up correctly in tables containing Chinese, Japanese or Korean text.
What about a pipe inside a cell?
Escape it as \| inside the cell. An escaped pipe is treated as part of the cell content, not as a column separator.
Related tools
See categoryMarkdown Table of Contents
Generate a nested table of contents from Markdown headings, with GitHub-compatible slugs and links.
Markdown to HTML
Convert Markdown to HTML source code — see the generated markup, not a preview.
CSV to JSON
Parse CSV (RFC 4180) into a JSON array, with delimiter sniffing and type inference.
JSON to CSV
Turn a JSON array of objects into CSV, with delimiter, header, and flatten options.