Fixed Width Text to CSV Converter – Parse Column-Aligned Text Free Online

Use the free Fixed Width Text to CSV Converter below: your data never leaves your browser — all work happens on your device, and nothing is uploaded to any server.

What this tool does

Fixed-width text is an old format that refuses to die. Bank statements, mainframe exports, government data files, and log dumps still align their columns by character position instead of commas or tabs. A line might put a name in the first ten characters, an age in the next two, and a city in the next ten. It looks tidy to the eye, but no spreadsheet can open it directly. This free Fixed Width Text to CSV Converter turns that column-aligned text into CSV you can open anywhere.

You tell the tool how wide each column is, for example 10,2,10, and it slices every line at exactly those positions, trims the padding spaces, and writes one CSV row per line. Short lines are handled gracefully: a missing trailing column simply becomes an empty cell rather than an error.

How to use it

Paste your fixed-width text into the input box. In the widths box, type the width of each column separated by commas, in left-to-right order. Press Convert to CSV. The output box shows the CSV result, which you can copy or download as a file.

Press Try a sample if you want to see the slicing in action before using your own data. The sample uses widths 10,2,10, and you can watch how names, ages, and cities land in separate columns.

How to find the right widths

The hardest part of fixed-width conversion is discovering the column widths, because the source rarely documents them. The reliable method is to look at the header row, if there is one, and count characters from the start of each column heading to the start of the next. Monospaced fonts help: paste the text into an editor that uses a fixed-width font, and the columns line up visually.

Another method is to find the longest value in each column and use that length, plus a little room. If values in a column run up to eight characters, a width of ten is a safe choice, provided the next column really starts at position ten. When in doubt, convert with your best guess and inspect the first few rows: misaligned widths show up immediately as values bleeding into the wrong column.

Where fixed-width files come from

Legacy systems produce fixed-width files because they predate CSV and because fixed positions make records easy to read with simple programs. Payroll exports, shipping manifests, census extracts, and some bank files still use the format today. Data analysts meet it when a client sends an export from an old system and expects it in a spreadsheet by the end of the day.

Researchers also meet it in published datasets, where codebooks describe each column by its start position and length. In that case the codebook gives you the widths directly, and this converter turns the raw file into a table in seconds.

Tips for clean results

First, check for a header row. If your file has one, convert it together with the data; the header becomes the CSV header, which makes the spreadsheet far easier to use. Second, watch out for tabs. A file that mixes tabs and spaces is not truly fixed-width, and its columns will slice unevenly. Replace tabs with spaces first, or ask the source for a clean export.

Third, be careful with characters that take more than one column in some encodings, such as accented letters in older encodings. If a column looks shifted by one character partway down the file, an encoding issue is the usual cause, and re-saving the file as UTF-8 before converting often fixes it.

Frequently asked questions

Is my data uploaded anywhere? No. Conversion runs entirely in your browser. Your text never leaves your device, and nothing is stored after you close the page.

What if a line is shorter than the total width? Missing trailing columns become empty cells. The row is still written, so row counts stay correct and nothing is silently dropped.

Can I use widths that do not add up to the line length? Yes. Extra characters past the last width are ignored, which is useful when lines carry trailing spaces or a record marker you do not need.

Does it handle values with commas? Yes. Values containing commas are quoted in the CSV output, so they stay in one column when opened in a spreadsheet.

Related tools

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top