CSV to Fixed-Width Text Converter
Turn CSV into fixed-width text with columns lined up by spaces. Numbers can be right-aligned, a line of dashes can go under the header, and you choose the gap between columns.
How to Convert CSV to Fixed-Width Text
Quick answer: paste your CSV or open the file; the Fixed-Width Text appears below. Copy it or download the .txt file.
-
1
Add your CSV
Paste it or open a file.
-
2
Choose options
Adjust the output on the right.
-
3
Check the Fixed-Width Text
Errors are explained clearly.
-
4
Copy or download
Save it as .txt.
What You Get
What Is CSV?
CSV (comma-separated values) is the universal spreadsheet exchange format: one row per line and a comma between values, with quotes around values that contain commas, quotes or line breaks. Every spreadsheet, database and data tool can read and write CSV.
What Is Fixed-Width Text?
Fixed-width text lines up data in columns by padding each value with spaces, so every column starts at the same position on every line. Old mainframe exports, bank statements, government data files and reports printed for monospaced fonts use this layout.
Why Convert CSV to Fixed-Width Text?
Fixed-width text is the clearest way to show a table in plain text: in emails, code comments, terminals, printouts and systems that read data by position. Converting removes the need to count spaces by hand.
How the Conversion Works
Each column is as wide as its longest value plus the gap you choose. Columns where every value is a number are right-aligned, others left-aligned, and an optional dashed rule separates the header. Line breaks inside values become spaces.
Example
The sample becomes a neat table with id, name, city, score and passed columns lined up, the scores right-aligned under their heading.
Who Uses It?
Analysts sharing tables in plain-text emails, developers writing reports and documentation, and teams preparing files for systems that read columns by position. Because everything happens in the browser, it is also safe for internal and confidential files.
Using Your Fixed-Width Text File
View fixed-width text in a monospaced font, such as in a plain text editor, code block or terminal, so columns line up. It is ideal for printing tables, pasting them into plain-text emails or preparing files for systems that read columns by position.
Common Problems in CSV Input
Check that the first row holds the column names and that every row has the same number of values. Values containing commas, quotes or line breaks must be wrapped in double quotes, with inner quotes doubled. The separator is detected automatically, so files using semicolons or tabs also work. Very wide files work too, though the result may be easier to check in smaller samples first.
Checking Your Fixed-Width Text Output
Every column is padded to the width of its longest value plus the gap you chose, so columns line up in any monospaced font. Number columns can be aligned to the right, as in printed reports, and a line of dashes can separate the header from the data. Check the widest column; very long values make a wide table, so consider shortening them first.
Step by Step
Start by pasting your CSV into the input box, or press Open File to load it from your device. The converter reads it straight away and shows the Fixed-Width Text in the output box. If the input has a problem, a short message explains what is wrong and where, so you can fix it in place. Next, adjust the options on the right; the output refreshes immediately so you can compare. When you are happy, press Copy to put the result on your clipboard, or Download to save it as a .txt file ready to use.
Private, Free and Instant
The converter is free, with no sign-up, no limit beyond the 5 MB file size and no watermark. It runs in your browser, so settings files with passwords, server addresses or customer data are never uploaded or stored. Paste the content, drop a file on the input box or press Open File, then copy the result or download it with the right file extension. It works on Windows, Mac, Linux, Chromebooks, iPhone and Android.
CSV to Fixed-Width Text: Aligning Columns
Some legacy systems need each field at a fixed position. The converter pads every column to a width based on its longest value or your settings.
Check
Values longer than the width are truncated, so set widths with care, and decide on left or right alignment. For the reverse, see fixed-width text to CSV.
Frequently Asked Questions
Questions about CSV to Fixed-Width Text