Six Whitespace Transformations
Remove selected whitespace with six explicit transformations. Trimming operates at each physical line edge. ASCII space collapse, tab deletion and recognized-whitespace deletion have different effects; choose the smallest change that solves your problem. It helps with trailing padding and pasted labels that have known edge padding, and with diagnosing spacing by comparing ASCII space collapse against destructive separator deletion.
Paste text, choose a mode and compare the output with the original. Trim Right leaves leading indentation. Delete Tabs can merge adjacent words or fields; use Convert Tabs/Spaces when separation should remain. Copy only after checking a few representative lines.
How Each Mode Treats Spaces, Tabs and Line Edges
Both, Left and Right use JavaScript trim rules on each line. Collapse ASCII Spaces changes consecutive U+0020 spaces to one, including indentation and trailing runs. Delete Tabs removes literal U+0009 without replacement. Delete Recognized Whitespace applies JavaScript whitespace matching to the whole input, including line separators. Other modes retain original CRLF, LF and CR separators in the input value. Removed units count UTF-16 units, not visible characters.
Reference: ECMAScript trim rules. Browser textareas and clipboard handling may normalize line endings.
Four Settings and Their Exact Results
| Input and setting | Result |
|---|---|
| Trim Right: two spaces + A + two spaces | Two leading spaces + A |
| Delete Tabs: A + tab + B | AB, with no separator |
| Collapse ASCII Spaces: A + two spaces + B | A + one space + B |
| Delete Recognized Whitespace: A + U+200B + B | U+200B remains |
Invisible Characters It Leaves Behind
JavaScript whitespace does not include every invisible format character. U+200B zero-width space and joiners remain. Removing all recognized whitespace is destructive and is not a source-code minifier, a CSV-column cleanup or a universal invisible-character remover. Even edge trimming can alter a quoted multiline value or meaningful indentation.
The tool takes at most 1,000,000 UTF-16 units across 20,000 physical items. Past that, or without a required browser API, the result is cleared and an error appears; these are caps, not a promise of speed. When the output is empty, Copy is disabled. Save the original before trimming if indentation or record structure matters.
Use Trim Right when trailing padding is the problem. Convert Tabs/Spaces keeps a deliberate separator when replacing tabs, and Add/Remove Line Breaks is the separate tool for changing physical separators.