Paste your text
Paste the text you want to clean into the input box. Any source—copy-paste, exports, or logs.
Trim whitespace from text instantly in your browser. Remove leading and trailing spaces, collapse multiple spaces, remove empty lines, and normalize line endings. Copy the cleaned output. Fast, free, and private.
Results
How it works
Everything runs in your browser. No account, no software, no data leaving your device.
Paste your text
Paste the text you want to clean into the input box. Any source—copy-paste, exports, or logs.
Choose trim options
Optionally collapse multiple spaces, remove empty lines, and normalize line endings (e.g. to Unix).
Click Trim
The tool trims leading and trailing whitespace from each line and applies your options in the browser.
Copy the output
Copy the cleaned text to your clipboard for use in code, configs, or other tools.
Why use this tool
Extra spaces and inconsistent line endings cause parse errors, diff noise, and messy data. Trimming whitespace normalizes text so it behaves consistently in code and configs.
Useful when you need to:
Clean pasted text
Remove stray spaces and tabs from copy-pasted content before using it in code or docs.
Normalize line endings
Convert Windows (CRLF) or mixed line endings to a single style (e.g. LF) for consistent behavior.
Collapse multiple spaces
Turn runs of spaces into a single space to tidy fixed-width or inconsistently spaced text.
Remove empty lines
Strip blank lines to compact lists, logs, or configs without manual editing.
Privacy
Your text is never uploaded to a server. This tool runs entirely in your browser using client-side processing.
Data stays on your device
Your data never leaves your browser. No uploads, no cloud storage, no logs.
Nothing stored or sent
No text is stored or transmitted. Trimming happens only in memory.
Fast and private
Trimming is instant and runs locally at full browser speed.
FAQ