Whitespace Cleaner
Clean up copied text, logs and code. Each fix is a separate option, so you only change what you intend to change.
Cleaned text
How to clean whitespace
- Paste the text you want to clean.
- Tick the clean-ups you want, such as trimming lines or removing empty lines.
- Choose a line-ending style if you need LF or CRLF.
- Copy the cleaned text.
Frequently asked questions
What are non-breaking and zero-width spaces?
Invisible characters often pasted from web pages, Word or chat apps. They look like normal spaces (or nothing at all) but can break code and searches. The cleaner can replace or remove them.
What's the difference between LF and CRLF?
Unix, Linux and macOS end lines with LF (\n). Windows traditionally uses CRLF (\r\n). Mixed line endings cause noisy diffs, so normalise to one style.
Related tools
- Remove Duplicate LinesDelete repeated lines while keeping the original order.
- Sort LinesSort lines alphabetically, numerically or in reverse.
- Text Diff CheckerCompare two texts side by side or inline.
More in Text Tools.