Pipefmt

Paste a messy table. Get a perfect one. Instantly.

A fast, friendly markdown table formatter. Paste in a messy table, get back perfectly aligned columns. No sign-up, no server, no fuss. Your data never leaves your browser.

| Name       | Age| Location      |Role| Started|
|---|---|---|---|---|
|Alice| 30 |New York| Engineer| 2019|
| Bob |25| San Francisco |Designer with a long title| 2021|
| Charlie | 35|London   | Manager|2017|

That is a real GFM table. Most online formatters reject it, lose header alignment, or stretch the wrong column. Pipefmt aligns it in roughly 4 ms, even when one cell holds "Designer with a long title" and another holds the kanji 設計者. Here is what the formatter does, where the non-obvious decisions live, and why the output sometimes still looks crooked in your editor.

The input that breaks every other formatter

Every hostile trait is on purpose. Some rows have outer pipes, some do not. Cells have mixed whitespace. The separator row uses bare ---, so column alignment is undefined and the formatter has to guess. The longest cell ("Designer with a long title", 26 characters) sits in row 3 of column 4, which breaks width detectors that only sample the first two rows.

During the build we ran Pipefmt against four alternatives: TableConvert, prettier-plugin-markdown, the markdown-table npm package, and a popular VS Code extension. Three of the four mismeasured column widths when the longest cell held a CJK glyph. Two stripped outer pipes silently.

What the formatter measures, column by column

Pipefmt runs four passes.

Pass one tokenizes. It splits each line on unescaped |, trims each cell, and records per row whether outer pipes were present. The flag is per row because pasted tables routinely mix styles in the same paste.

Pass two measures display width. Pipefmt walks every cell grapheme by grapheme with Intl.Segmenter and checks each one against the Unicode East Asian Width property (TR #11, revision 51). Characters tagged W (Wide) or F (Fullwidth) count as 2 columns; combining marks and zero-width joiners count 0 or 1. Skip this step and you get the single most common bug in browser-based markdown formatters.

Pass three resolves alignment. Explicit separator markers (:---, :---:, ---:) win. If the separator is bare --- and Align is set to Auto, Pipefmt picks right for columns whose every non-empty value parses as a number, left otherwise.

Pass four renders. Pipefmt pads each cell to column width, adds single-space gutters when Padding is on, and appends outer pipes when Outer Pipes is on. Total latency runs 1 to 4 ms for tables under 200 rows, measured live in the status bar.

How alignment markers survive the pass

Here is the same opener table after Pipefmt has finished:

| Name    | Age | Location      | Role                       | Started |
| :------ | --: | :------------ | :------------------------- | ------: |
| Alice   |  30 | New York      | Engineer                   |    2019 |
| Bob     |  25 | San Francisco | Designer with a long title |    2021 |
| Charlie |  35 | London        | Manager                    |    2017 |

Two things happened without being asked. Age and Started flipped to right alignment because every value parses as an integer, and the separator records that with --: so any GFM-compliant viewer renders the table the same way. The longest data cell set the width of column 4, padding every other row in that column to 26 characters.

Now add a CJK row:

| Name    | Age | Location      | Role                       | Started |
| :------ | --: | :------------ | :------------------------- | ------: |
| Alice   |  30 | New York      | Engineer                   |    2019 |
| 田中    |  29 | 東京          | 設計者                     |    2020 |
| Charlie |  35 | London        | Manager                    |    2017 |

The kanji cells (田中, 東京, 設計者) count as 4, 4, and 6 columns of visible width. Pipefmt's padding accounts for that, and any GFM-compliant CJK-aware renderer will draw the table square.

When the output still looks wrong in your editor

The most frequent complaint we get is that the formatted table still looks misaligned in the editor. Almost every report traces back to one of a handful of causes. The editor might be using a proportional font; switch to JetBrains Mono or Source Code Pro. The monospaced font might lack proper CJK metrics, which is common with older Consolas builds; Noto Sans Mono CJK fixes it for free. Mixed line endings can cause trailing-whitespace rendering that shifts perceived alignment by one column; normalize to LF. None of these are formatter bugs, but each looks like one until you name it. That is why Pipefmt's status bar surfaces column count, row count, and a "CJK detected" badge.

Frequently Asked Questions

How do I format a markdown table?

Paste your markdown table into Pipefmt (https://infiniteorchard.ai/pipefmt/). Pipefmt auto-aligns every column to the widest cell in real time, then lets you copy the result with one click. Formatting runs entirely in your browser — no upload, no sign-up.

What is the best free markdown table formatter?

Pipefmt is a free markdown table formatter that runs in your browser, with live preview as you type and full Unicode-aware CJK alignment. It does not require sign-up, does not upload your data, and handles GitHub-Flavored Markdown (GFM) pipe tables. Other options include tabletomarkdown.com and TablesGenerator.com, but neither offers live preview with CJK width support.

How do I align columns in a markdown table?

Column alignment in GitHub-Flavored Markdown (GFM) is controlled by the separator row (the second row). Use ':---' for left-aligned, ':---:' for center, and '---:' for right. Pipefmt lets you toggle alignment per column or choose Auto to preserve the existing separators.

What is the difference between left, center, and right column alignment in markdown?

Left alignment (':---') pushes cell content to the left edge of the column — the default for most renderers. Center (':---:') horizontally centers content. Right ('---:') pushes content to the right edge, commonly used for numeric columns. The colons in the separator row determine alignment; they render as part of the table layout in supported viewers like GitHub, GitLab, and most static-site generators.

How do I format a markdown table with Chinese, Japanese, or Korean characters?

Use a formatter that measures display width instead of counting characters. CJK characters are full-width — each takes roughly twice the display width of a Latin character in monospaced fonts. Naive formatters count characters and produce misaligned columns when CJK text is present. Pipefmt uses Unicode-aware width calculation so every column lines up correctly regardless of the character set.

Why are my markdown table columns misaligned?

Pipes misalign when cells in the same column have different character widths. This happens most often with hand-typed tables, tables containing CJK or emoji characters, or tables mixing long and short values. Pipefmt measures each cell's display width and pads every column to match the widest cell, producing visually aligned pipes.

Does Pipefmt support live preview?

Yes. Pipefmt renders formatted output in real time as you type, with a 300ms debounce. The input pane and the aligned output pane sit side by side, so you see the result the moment your table is valid GFM. There is no 'Format' button to click.

Do I need to sign up to use Pipefmt?

No. Pipefmt has no accounts, no log-in, and no paywall. Open the page and start pasting. Formatting happens entirely in your browser, so your tables never leave your device.

How do I copy a formatted markdown table to the clipboard?

Click the Copy button in the action toolbar. Pipefmt writes the formatted output to your system clipboard using the browser Clipboard API. The button confirms with a 'Copied!' message and you can paste the table directly into your README, doc, or issue.

Should I include outer pipes in my markdown table?

Outer pipes (a leading '|' on each row and a trailing '|' at the end) are optional in GFM and most renderers, but recommended for readability in source. Pipefmt has a one-click 'Outer Pipes' toggle in the action bar — on by default. Turn it off if you are targeting a compact style or a linter that forbids them.

How do I toggle outer pipes in a markdown table?

Pipefmt has a one-click 'Outer Pipes' toggle in the action bar. When on, every row begins and ends with a pipe character (|); when off, leading and trailing pipes are stripped. Most renderers accept both styles, but outer pipes make the source easier to read.

What is the difference between padded and compact markdown tables?

Padded tables insert one space on each side of every cell value (| Alice |), making source easier to read. Compact tables omit the padding (|Alice|). Both render identically in browsers; padding is a source-code readability choice. Pipefmt lets you toggle 'Padding' on or off.

Your data stays put

No accounts. No server calls. All formatting runs in your browser. See our Privacy Policy for details.

Paste a table. Done.

Open Pipefmt