Toolvore

Fixed Width to CSV

Convert a fixed-width text report to CSV with explicit field widths, named columns, optional trimming and clear record-length errors.

This tool processes its input contents in your browser instead of sending them to a processing service. Page, asset and fixed usage-measurement requests are described on the Privacy page.

Extract fixed-width text fields into named CSV columns using explicit character widths, optional remainder capture and deliberate trimming.

How to use it

  1. 1Paste the UTF-8 report, then enter field widths and named headers.
  2. 2Choose whether to trim edges or retain remaining text.
  3. 3Convert, check the resulting rows and download CSV.

Example

Input
001Mira 002Kai
Output
id,name 001,Mira 002,Kai

Widths 3,5 and headers id/name, with edge trim explicitly enabled.

What happens to your data

Fixed-width slicing and UTF-8 decoding happen locally. No report lines or field contents leave this tab for conversion, and an invalid line yields a position/length error rather than a guessed correction.

Last updated November 2026

Turn a fixed-width text report into a CSV table by specifying the layout you know. For example, a three-character identifier followed by a five-character name becomes two named columns. Field boundaries are explicit rather than inferred from spaces or guessed from sample rows.

How it works

Enter positive widths separated by commas and one output header per line. Enable the remainder option to keep all text after the stated widths in an additional named column. Otherwise every record must have exactly the total declared width. Short records always fail with a line number. Blank internal lines are real records, not silently discarded; one final line ending does not add a record. LF and CRLF are supported, while lone CR is rejected.

Widths count Unicode code points. An emoji is one character, but a tab is also one character; the tool does not infer encoded byte widths, grapheme clusters or terminal display columns. Trim is optional and only changes field edges. IDs, dates and amounts remain strings. This is useful for known character layouts, not arbitrary visual alignment or legacy binary encodings.

CSV output uses UTF-8 without BOM and CRLF endings. Up to 500 KiB input, 10,000 records including the header, 128 columns, 200,000 cells and 2 MiB output. Spreadsheet formula protection is enabled by default and visibly prefixes formula-like cells and headers with an apostrophe. You can deliberately disable it for literal output; spreadsheet software may then execute formula-like strings. A header collision introduced by protection fails. No numeric/date coercion is performed.

Worked example: Fixed Width to CSV example

Input
001Mira 002Kai
Result
id,name 001,Mira 002,Kai

Widths 3,5 and headers id/name, with edge trim explicitly enabled.

Common use cases

  • Prepare a text report with documented fixed field lengths for a spreadsheet.
  • Retain leading-zero IDs while extracting adjacent name fields.
  • Keep an unstructured trailing note in a named remainder column.

Frequently asked questions

Are widths measured in bytes?+

No. Widths count Unicode code points after UTF-8 decoding. Byte-based legacy layouts need conversion or a separate byte-aware tool.

Will spaces be removed?+

Only if you select edge trimming. Otherwise extracted leading/trailing spaces remain in each CSV cell.

What happens to long or short lines?+

Short lines fail. Longer lines fail unless you deliberately retain a remainder and supply its extra header.