Whitespace Cleaner
Eight switches you can combine: trim, collapse spaces, drop blank lines, tabs to spaces, strip BOM, CRLF to LF, single trailing newline.
How to Use
- Paste the text
Drop the content in on the left; the right pane updates live and reports the character delta.
- Tick the rules
Copied from a web page: trim ends. Copied from Windows Notepad: CRLF to LF. Copied from a PDF: drop whitespace-only lines. Script files: strip BOM.
- Copy it out
Hit Copy result once it looks right, or use Move result into input to run another pass. All local, so nothing sensitive is uploaded.
FAQ
What is the difference between the two blank-line options?
One removes lines with no characters at all; the other also removes lines that contain only spaces and tabs. Text copied out of PDFs, Word or spreadsheets is full of lines that look empty but are not, and that is when you want the whitespace-only version.
How many spaces does a tab become?
Always four, the most common indent width in the industry. If your project uses two, convert and adjust afterwards, or skip that switch and only trim the ends.
What is a BOM?
A UTF-8 file may start with three invisible bytes (EF BB BF) that Microsoft added so Notepad would recognise the encoding. On Linux, grep and scripts then see a garbled first character — this is behind many "why is there a weird character at the start" puzzles.
Does CRLF to LF change my content?
Only the line terminators themselves: Windows uses two bytes (carriage return plus line feed), while Unix and modern macOS use one. Standardising on LF avoids false "every line changed" diffs when running scripts on a server or comparing in Git.