AZ Tools

Fixed-Width Text Parser to CSV / JSON

Convert

Many legacy systems, mainframe reports and COBOL exports store data in fixed-width columns instead of using a delimiter. Paste that text, list the column widths (e.g. 6 3 8), and each line is sliced into fields and exported as CSV or JSON. Optionally trim padding spaces, and treat the first row as a header to build JSON objects keyed by column name. Everything runs locally in your browser — nothing is uploaded.

Result

How to use

  1. Paste your fixed-width text, one record per line.
  2. Enter the column widths separated by spaces or commas (e.g. 6 3 8).
  3. Choose CSV or JSON output and toggle trimming.
  4. For JSON, enable 'first row is header' to key objects by column name, then copy the result.

Frequently asked questions

How do I know the column widths?
Count the characters each column occupies in the source layout, including padding spaces. Most fixed-width specs document the widths; you can also align the text in a monospace editor and count.
What happens if a line is shorter than expected?
Fields past the end of a line come out empty. Lines longer than the total width have the extra characters ignored.
How is the CSV quoted?
Fields containing a comma, double quote or line break are wrapped in double quotes, and inner quotes are doubled, following RFC 4180.
Is my data uploaded?
No. Parsing happens entirely in your browser; nothing leaves your device.

Related tools