Fixed Width Data to CSV

Slice exact-width text records into CSV fields using explicit UTF-16 column widths.

Input stays in this browser and is not uploaded.

Every record must exactly match the total UTF-16 widths. No automatic header detection. A boundary inside a surrogate pair is rejected.

Slice records using explicit column widths

Paste fixed-width text, enter Column widths (comma-separated), and choose Convert fixed widths. Every input record is data; generated headers are field1, field2 and so on. The tool does not guess column boundaries or treat the first source line as a header.

Example: an identifier and a padded name

The example uses widths 3,4. Record 001Ada becomes identifier 001 and name Ada , including its trailing space. The second record becomes 002 and Lin . By default padding is preserved. Enable Trim each extracted cell to remove surrounding JavaScript whitespace; that choice changes values and clears the old result.

Widths count UTF-16 units

Widths count JavaScript UTF-16 code units, not bytes, grapheme clusters or screen columns. A supplementary emoji normally occupies two such units, and a tab counts as one rather than expanding to a visual tab stop. A boundary splitting a surrogate pair is rejected. Use this only when the export's width convention matches these units; UTF-8 byte-based mainframe layouts need a byte-oriented parser.

Every record must have exactly the sum of the widths. Extra characters and short lines cause a numbered error rather than being silently dropped or padded. LF, CRLF and CR delimit records, so embedded newlines cannot belong to a field. A final line ending is allowed without adding another record.

Keep the extraction bounded and reviewable

Use up to 200 positive column widths totaling at most 10,000 units, and up to 10,000 records. Output is quoted comma CSV with CRLF separators. Optional spreadsheet protection adds apostrophes to formula-like cells and therefore changes values. Inspect the first few records and preserve the original text before using the converted file elsewhere. CSV Column Renamer can replace generated field names after conversion.

Input and output limits

The page supports up to 200,000 input characters, 200 columns and 10,000 data records, with a two-million-character output limit. Processing stays in this browser. Editing source text or options clears prior results and download links. No source file is overwritten.

A leading byte-order mark is rejected rather than retained in the first field. Unpaired surrogate code units are rejected because a UTF-8 download could not preserve them.