Convert a fixed-width or mainframe text file to CSV

Last reviewed 2026-09-19

Fixed-width files have no commas or tabs: each field simply occupies a set number of characters. Older systems, bank and government extracts and mainframe jobs still produce them, and you need the column widths to read them.

Messages you might see

  • “Data has no delimiters, columns are lined up with spaces”
  • “Records are a fixed length with no line breaks”

Why it happens

  • The source is an older system that writes fixed-length records.
  • A report was saved as text instead of a spreadsheet.

Try this first (free, no tool needed)

  1. In Excel use Data > From Text/CSV or the legacy Text Import Wizard and choose Fixed width, then drag the column breaks.
  2. If you have a record layout document, use its start positions and lengths rather than guessing.
  3. Check the first few converted rows against the original report to confirm that no column is cut off.

If that didn't work

These tools run in your browser. Your file is read and repaired on your own device and is never uploaded.

Fixed-Width Text File Parser

Auto-detects column boundaries from the whitespace gaps that line up in every row, or lets you give exact column start positions, then exports a clean CSV with correctly quoted values.

Open Fixed-Width Text File Parser

Legacy Fixed-Length Mainframe File Converter

Splits fixed-width records into fields from your width map (for example 10,20,8 or id:6,name:20), handles files with or without line breaks, pads short records and can decode COBOL zoned-decimal signs. Text files only: EBCDIC and packed-decimal binary files are not supported.

Open Legacy Fixed-Length Mainframe File Converter

Common questions

Where do I get the column widths?

From the system's record layout or file specification. If you have none, the auto-detect option can find them when the columns are separated by blanks.

Is my file uploaded anywhere?

No. The tool runs as a program inside your own browser, so the file is read and repaired on your device and never sent to a server.

Related guides