Fixed-Width to CSV

Transform fixed-width text into a well-structured CSV file.

About Fixed-Width to CSV

Positional files from banks, mainframes, government agencies and old ERPs have no delimiter: each field lives between fixed character positions. Spreadsheets cannot read them directly. This tool cuts every line at the column widths you specify, trims the padding spaces and produces a standard CSV with every value quoted.

Paste the text, enter the widths as a comma-separated list, name the output file and download the CSV. The slicing runs in the browser, so bank statements and payroll files stay on your machine.

How to use Fixed-Width to CSV step by step

  1. Type the name of the CSV file to download.
  2. Enter the column widths separated by commas, for example 10, 10, 10 for three columns of ten characters each.
  3. Paste the fixed-width text into the text area.
  4. Click "Convert and download CSV". Each line is sliced at the given positions, trimmed and quoted.

Input and output example

Input

Juan      Pérez     Madrid   
Ana       García    Barcelona
(widths: 10, 10, 9)

Output

"Juan","Pérez","Madrid"
"Ana","García","Barcelona"

Why use our Fixed-Width to CSV?

Common use cases

Limits and tips

Frequently asked questions

How do I find the column widths?

Look at the file specification if there is one. Otherwise open the text in a monospaced editor, place the cursor at the start of each column and note the character position; the width of a column is the position of the next column minus its own. Header rows with aligned names make this easier.

What is the difference between fixed-width and delimited files?

Delimited files such as CSV mark column boundaries with a character (comma, semicolon, tab). Fixed-width files have no marker: columns are defined by their character positions and padded with spaces. Delimited files are compact and flexible; fixed-width files are predictable and common in banking and mainframe systems.

Why are all the values quoted in the CSV?

Quoting every value guarantees that names containing commas, quotes or other special characters stay in one column when the CSV is opened in Excel or read by a program. Spreadsheets remove the quotes automatically when displaying the data.

Can I convert a file with a header line?

Yes, as long as the header is aligned to the same widths as the data. Its names are then sliced into the first CSV row. Separator lines made of dashes should be removed beforehand.

Is the file uploaded?

No. The text is processed in your browser tab with JavaScript. The CSV is generated locally and never sent to a server.

Related tools

Other free utilities you may find useful

Available languages