📐Text Column Aligner

Pad text to align columns

spaces

How to use the column aligner

A list copied out of a spreadsheet loses its shape the moment it lands in a plain text file, a code comment or a chat window. This tool splits every line on the separator you choose, measures the longest value in each column and pads the rest with spaces so the columns line up. Choose comma, tab, whitespace runs or pipe, and switch between left and right alignment. Right alignment is usually the better choice for numbers because it lines the digits up.

The important part is how character width is measured. CJK characters, kana, full-width symbols and emoji occupy two columns in a monospaced font. Padding by character count alone makes any line containing them stick out, so by default those characters count as two columns and the visible width really matches. Emoji built from several code points are measured as a single unit. Untick the option to fall back to plain character counting, where every character counts as one.

The aligned output only looks right in a monospaced font. In a proportional font such as Arial the columns will still drift, so paste the result into a code editor or terminal to check it. Leading and trailing spaces inside each cell are trimmed and trailing spaces at the end of a line are removed. The gap between columns can be set from 1 to 20 spaces.

Frequently asked questions

My columns still drift even though the tool says they are aligned.

The font you are viewing the result in is most likely proportional. The alignment assumes a monospaced font where CJK characters take two columns, so check it in a code editor or terminal.

What happens when lines have different numbers of cells?

The line with the most cells sets the column count and shorter lines are padded with empty cells. Any spaces left at the end of a line are removed automatically.