Fixed-width parsing

Fixed Width Text to CSV Converter

Turn fixed-width or fixed-length text — columns aligned by spaces rather than a delimiter — into clean CSV. Auto-detect the column boundaries or set exact widths, preview the split, and export.

FreeNo sign-upRuns in your browserExcel-friendly
Fixed Width Text to CSV Converter
Paste or upload text to convert.
Input — paste or upload
Drag a file here, or browse (.txt, .csv, .tsv, .json)
Output
Input is
Input delimiter
Column widths
Output as
Custom delimiter
Plain text style
Quoting
Line ending

A live table preview of your data appears here.

Leave Column widths blank to auto-detect, or type widths like 10 8 12 to set them exactly.

Advertisement
What it does

Convert fixed-width text to CSV

Fixed-width files line up data by character position instead of a delimiter — common in banking, mainframe and legacy report exports. To convert fixed width text to CSV, the tool slices each line at the right positions and writes proper comma-separated values.

Paste or upload the text. Leave Column widths empty and the converter detects boundaries by finding the positions that are blank in every row; or enter the widths yourself (for example 10 8 12) for full control. The live preview shows the resulting columns immediately.

If your data is actually separated by a character, use delimited text to CSV. For the reverse, see CSV to fixed width.

Step by step

How to use it

Paste or upload

Add your text or drop a file — it is read locally in your browser, never uploaded.

Preview & adjust

Check the live table and the row / column counts, then tweak the delimiter or options if a column looks off.

Copy or download

Grab the result with Copy or Download. You can reopen recent conversions from this device too.

Example

Input and output example

Space-aligned fixed-width columns parsed into CSV (widths auto-detected).

Input
name      city
Ada       NY
Lin       LA
Output
name,city
Ada,NY
Lin,LA
Details

Defining columns precisely

Auto-detection covers most files; explicit widths handle the tricky ones.

Auto-detecting column boundaries

With Column widths blank, the parser scans your rows and marks every character column that is a space in all of them as a gap, then treats the runs between gaps as fields. This works well when columns are cleanly separated by at least one space.

Setting exact widths

When values touch or a column can be blank, auto-detection may guess wrong. Enter the widths directly — 10 8 12 means the first field is 10 characters, the next 8, then 12, with anything left over forming a final column. Use a 0 to capture the remainder of the line.

Trimming and empty fields

Each sliced field is trimmed of surrounding spaces, so padded values come out clean. Blank positions become empty CSV cells rather than disappearing, keeping every row the same width.

Verifying with the preview

The table preview and the column-count indicator make it obvious when a width is off — misaligned data shows up immediately, so you can adjust the widths before exporting.

Good to know

Tips and edge cases

  • Count characters in a header row to work out exact widths quickly.
  • A trailing 0 width captures everything remaining on the line.
  • If fields run together with no gap, explicit widths are the only reliable option.
Good to know

Why fixed-width files still exist

Fixed-width feeds persist in finance, government and older enterprise systems because they are unambiguous: every field has a known position. Converting them to CSV makes the same data usable in modern tools without rewriting the source. When a specification lists exact field widths, enter them directly for a perfect split; otherwise auto-detection is a fast first pass you can verify in the preview.

FAQ

Fixed Width Text to CSV Converter — FAQ

How do I define column widths?

Type them in the Column widths box, separated by spaces, e.g. 10 8 12. Leave it blank to auto-detect.

How does auto-detection find fields?

It marks character positions that are blank in every row as gaps and treats the text between gaps as columns.

What if columns have no space between them?

Use explicit widths — auto-detection needs at least one space between columns.

Are surrounding spaces removed?

Yes, each field is trimmed so padded values come out clean.