Clean spacing
- Paste text or import a local UTF-8 TXT file, then choose which spaces to clean.
- Select run replacement, line-edge trimming and blank-line handling independently.
- Clean and review the result before copying or downloading.
The default replaces each run of ASCII spaces or tabs with one ordinary space, trims line edges and retains all blank records. With run replacement enabled, even a single tab becomes a space. Switch it off to trim edges while retaining internal spacing. Original text stays available as a separate download.
Choose the scope deliberately
ASCII mode affects U+0020 space and U+0009 tab only. Unicode mode also affects native Unicode White_Space characters within each line, including non-breaking spaces, narrow non-breaking spaces, typographic spaces, vertical tab and form feed. Replacing them loses their spacing and non-breaking behavior. Zero-width space U+200B, U+FEFF and joiners remain untouched; they are not Unicode White_Space. Letters, case, punctuation and combining marks receive no transformation or normalization. Unicode property reference.
Blank-line rules use the selected scope, independently of trimming. Collapsing keeps the first selected-scope blank record in each consecutive run; removing drops all such records. Kept blank values still receive any selected run/edge cleanup. Retained-line changes count value transformations only, while removed blank lines are reported separately; line-delimiter normalization is not counted as a changed line.
Preview and recover changes
Live preview waits 450 ms and pauses during input-method composition; turn it off to process manually. Show whitespace marks reveals bounded before/after previews, with spaces, tabs, non-breaking spaces and line breaks visible. Markers are display-only and may not be visually distinguishable from identical characters already in your source. Exports contain the actual text only. A code-point preview boundary can split a combined character; the complete result remains in the editor and downloads.
TXT import validates UTF-8, removes an initial BOM and converts CRLF/CR to LF. Invalid files preserve the draft and result; editing cancels stale reads. Large paste uses one validated replacement. Import, example, large paste, Clear and Use result offer one undo step. Typing or changing cleanup settings discards it. Clear retains settings. Use result replaces your source only when chosen; Undo restores the prior source.
Line endings and privacy
Line records recognize CRLF as one boundary, LF, CR, U+0085 NEXT LINE, U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR. Boundaries are not collapsed into spaces. Output record delimiters use LF. A final delimiter terminates a record rather than adding an empty record, and is retained when records remain. Empty input or removal of all records gives empty output.
Original TXT preserves the current textarea value. Browsers normalize textarea CR/CRLF to LF, so raw clipboard encoding cannot be recovered. Cleanup can alter code indentation, tables, poetry or significant whitespace: review the result. Local worker only, valid Unicode up to 100,000 UTF-16 units, ten-second timeout, cancellation and stale-result guards. No upload, storage, external API, executable HTML or user-defined regex. Unpaired surrogates reject for valid UTF-8 exports. Clipboard copying is optional; use downloads or selection if unavailable.