BYTETOOLS

Fixed Width to CSV Converter

Convert fixed-width or COBOL-style text files to CSV online. Enter column widths or break positions, preview cuts on a live ruler and trim the padding.

Drop a fixed-width .txt file here or click to browse

What is the Fixed Width to CSV Converter?

The ByteTools Fixed Width to CSV Converter splits column-aligned text files — mainframe reports, COBOL data files, bank exports, old printer layouts — into proper CSV.

  • Field widths or cut-position input, whichever you have
  • Live colour-coded ruler with a character scale
  • Trim padding on both sides, right only, or keep it
  • Overflow past the last field kept as a final column
  • Proper CSV quoting of fields containing commas
  • 100% in-browser — files never leave your machine

How to use the Fixed Width to CSV Converter

  1. 1

    Paste your fixed-width text or drop the file.

  2. 2

    Choose whether you are entering field widths (10, 5, 8) or break positions (10, 15, 23).

  3. 3

    Type the numbers and check the coloured ruler over the first line.

  4. 4

    Pick how padding should be trimmed.

  5. 5

    Click Convert to CSV, then copy or download the result.

About the Fixed Width to CSV Converter

The ByteTools Fixed Width to CSV Converter splits column-aligned text files — mainframe reports, COBOL data files, bank exports, old printer layouts — into proper CSV. Enter the width of each field, or the positions where columns break, and every line is sliced at exactly those points.

A live ruler renders your first line with each field highlighted in a different colour and a character-position scale above it, so you can see precisely where the cuts land before converting. Padding spaces are trimmed from both sides, the right side only, or kept as-is, and anything beyond the last declared width becomes a final catch-all column.

Conversion happens 100% locally in your browser — legacy files with account numbers or payroll data are never uploaded anywhere.

Frequently asked questions

What is a fixed-width text file?

It is a format where each field always occupies the same number of characters and is padded with spaces instead of being separated by commas. Mainframe systems, COBOL programs and many bank or government exports still produce them.

How do I find the correct column widths?

Watch the live ruler above the result: it shows your first line with every field in a different colour and position markers every 5 and 10 characters. Adjust the numbers until each colour block lines up with one field, then convert.

What is the difference between widths and break positions?

Widths are the length of each field, like 10, 5, 8. Break positions are the character columns where a new field starts counting from the line start, like 10, 15, 23 — useful when a spec sheet lists column start/end positions. Both describe the same cuts.

What happens to lines longer than the declared fields?

The remaining characters are kept as one extra final column rather than thrown away, so trailing free-text fields survive. Lines shorter than the declared widths simply produce empty trailing fields.

Should I trim the padding?

Usually yes — trimming both sides gives clean values like JOHNSON instead of 'JOHNSON '. Keep padding only when the exact spacing carries meaning, such as when the file must be reconstructed later.

Related tools