Fixed-width column cutter
Cut columns out of fixed-width text by a width table such as 10,12,8 or by a single column number, counting code points or UTF-8 bytes and optionally trimming each column, with truncated-line stats.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
For example 10,12,8 cuts every line into columns of width 10, 12 and 8. Leave it empty to treat every unit as its own column and use "column number" to pick one.
Columns are cut by code point or by UTF-8 byte; in code-point mode a Chinese character counts as one column (not the two columns of its display width).
Extracted columns
Every line is cut by the width table; a line shorter than the table gets a truncated last column (counted as "truncated lines").
Enter fixed-width text to extract columns
What this tool does
- Split fixed-width exports into fields, for example legacy 10/12/8 records
- Keep only one column of a fixed-width file (a status or amount field) and drop the rest
Example
Input
1001Shirt M 1002Hoodie XL
Output
1001 | Shirt | M 1002 | Hoodie | XL
Width table 4,12,8 with every column joined by " | " and trim enabled: the 4-wide id, the 12-wide padded product name and the size column.
Frequently asked questions
How is this different from the "text column slicer"?
This tool works with a **width table / single column number**: 10,12,8 cuts a line into columns of width 10, 12 and 8, then "column to keep" selects one of them (0 outputs all columns joined by the separator); with an empty width table every character is its own column. The **text column slicer** works with a **list of column ranges**: 1-10,20-30 keeps columns 1-10 and 20-30 concatenated, with overlap merging and short-line skipping. Use this tool to split fixed-width fields, use that one to keep several slices.
How are Chinese characters and emoji counted?
By Unicode code points by default: one Chinese character or one single-code-point emoji equals one column, and columns are cut at code-point boundaries, so a character is never split. This is not the same as monospace display width — in a terminal a Chinese character usually takes two cells, and this tool does not pad to display width. With the UTF-8 byte unit a Chinese character counts as 3 bytes, and a byte boundary inside a character decodes to U+FFFD; only use it when the alignment must be in bytes.
What if a line is shorter than the width table?
No error is raised: the last column simply ends at the end of the line and the "truncated lines" counter increases, so you can spot misaligned data. Missing columns are not padded with spaces or placeholders.
Is whitespace inside columns removed?
No by default (padding inside fixed-width data is often meaningful). Enable "trim every extracted column" to trim each column. The original file is never modified; the result can be copied or downloaded as a new TXT.
Keywords:fixed width cuttercut columntxt-cut-col