Markdown Table Formatter

Paste a Markdown table with misaligned pipes and uneven spacing, get it back cleanly padded, content and alignment untouched.


          
        

Rendered preview

How it works

Each line is split into cells on unescaped pipe characters (a pipe preceded by \ stays inside a cell rather than splitting it), and the optional leading and trailing pipes on each row are dropped before splitting, matching how Markdown itself treats them. The second row is checked against the separator pattern (:---, :---:, ---:, or plain ---); when it matches, its colons set each column's alignment, and when it doesn't, the tool falls back to a plain left-aligned separator and says so. Every column is then re-measured against its widest cell and repadded, so pipes line up whether the table is viewed as rendered HTML or as raw text in an editor.

Formatting happens entirely in this page's JavaScript on keystroke. Nothing you paste is uploaded.

Common questions

How is this different from the Markdown Table Generator?

The Generator builds a new table from CSV/TSV data. This tool instead takes a table that's already in Markdown syntax but whose pipes and spacing have drifted out of alignment (common after manual edits), and re-pads it without changing any cell content or existing alignment markers.

Does it preserve column alignment?

Yes. If your separator row already has colons (:--- , :---:, or ---:), that alignment is read and kept. If a table has no valid separator row, columns default to left-aligned and a note explains that a fresh one was generated.

Is my table sent anywhere?

No, parsing and formatting happen entirely in your browser. Nothing you paste is uploaded.