Align Tab-Separated (TSV) Data into Clean Columns
Transform tab-separated data into evenly spaced columns. Ideal for spreadsheet exports and database query output.
Detailed Explanation
Aligning Tab-Separated Data
Tab-separated values (TSV) are a common export format from spreadsheets, databases, and command-line tools like cut and awk. While tabs provide some visual spacing, the alignment breaks down when cell contents vary in length.
Before
id\tname\temail\trole
1\tAlice\talice@example.com\tadmin
2\tBob\tbob@company.org\tuser
3\tCharlie\tcharlie@test.io\tmod
After (space-padded)
id name email role
1 Alice alice@example.com admin
2 Bob bob@company.org user
3 Charlie charlie@test.io mod
Step-by-Step
- Select Tab as the input delimiter.
- Choose Spaces as the output delimiter for clean visual spacing.
- Enable Trim whitespace to remove any extra padding the exporter may have added.
- The tool detects four columns and automatically calculates the width needed for each.
Why Tab Data Needs Re-Alignment
Tab stops are typically set at 8-character intervals in terminals, but this is a display convention rather than an actual column width. A 3-character cell and a 15-character cell both consume one tab, yet they push the next column to very different screen positions. Replacing tabs with measured space-padding ensures consistent alignment regardless of the viewer's tab-stop settings.
Use Case
A database administrator copies query results from a terminal and needs to share them in a document or code comment with consistent column widths.