Neatbo.

Fixed-width and CSV converter

Split fixed-width records by explicit Unicode code-point widths, or pad CSV fields into a fixed-width text file.

Browser-local processingInputFixed-width + JSON / CSV + JSONOutputCSV / Fixed-widthUp to 1 MiB per file · File limit: 1
  1. 1Add input
  2. 2Adjust settings
  3. 3Get your result

Tool input and files are processed in this browser without being uploaded.

Your input

Inputs are kept temporarily in this tab when switching tools. Refreshing or closing clears them; large results may need to be regenerated.

⌘ / Ctrl + Enter to run

or drag and drop it here

Files stay on this device. Your originals stay unchanged.

.txt · .csv · .dat

Up to 1 MiB per file · File limit: 1

    0 characters · 0 bytes
    Options

    Complete the required options first. You can keep the defaults for the rest.

    Preparing the tool…

    Before you start

    Convert a legacy text export without trimming its field spaces. Supply the field names and widths, inspect complete records, and download the receiving format.

    How to use this tool

    1. Choose a direction and paste the records, or open a local UTF-8 export.
    2. Enter widths JSON in field order. Count code points and include meaningful spaces; do not infer widths from a proportional-font preview.
    3. Check the field preview and spreadsheet-protection setting, then copy or download the complete CSV/text result.

    Supported inputs and limits

    One UTF-8 file or pasted source up to 1 MiB, plus widths JSON up to 1 MiB. A selected file takes precedence. At most 10,000 records, 100 fields, 1,000 code points per field and 10,000 per complete record. UTF-8 BOM is omitted.

    Widths count Unicode code points, not bytes, display columns or grapheme clusters. An emoji is one code point; combining marks count separately. Each fixed-width line must have exactly the declared total width. No leading/trailing spaces are trimmed.

    The secondary JSON is an array of {name,width} objects with unique nonempty names and positive integer widths. CSV requires the same headers in the same order and at most 200,000 input cells including headers. CSV to fixed-width rejects overflowing or multiline cells, pads on the right with ASCII spaces and uses LF record endings.

    CSV downloads use spreadsheet protection by default: formula-like cells gain a leading apostrophe. Disable it explicitly when you need unchanged field text. Preview shows up to 200 records; downloads contain every record.

    Worked example

    Example input

    0001Ada  
    0002张三   
    Example options
    {"params": {"direction": "to-csv", "spreadsheetSafe": false}, "secondary": "[{\"name\":\"id\",\"width\":4},{\"name\":\"name\",\"width\":5}]"}

    Example output

    id,name
    0001,Ada  
    0002,张三   

    When something does not work

    Check the failing record length and widths. For CSV export, match header order and shorten overflowing fields or resolve embedded newlines. Remove the selected file before using pasted source.

    Frequently asked questions

    Does width mean UTF-8 bytes?

    No. 张 and 😀 each count as one code point here, though their UTF-8 byte counts differ. Byte-based formats need a different specification.

    Can it guess widths or trim padding?

    No. Names and widths are explicit, and fixed-width padding remains part of the extracted value.

    Why does reverse conversion reject a line break?

    A multiline CSV value cannot fit one fixed-width physical record without changing its meaning.

    Documentation & further reading

    Related tools