Trim Whitespace Tool
Remove unwanted spaces and whitespace from text. Choose from five modes: trim both ends, trim start, trim end, collapse spaces, or remove all whitespace.
Processed locally in your browser — nothing is uploaded.
How to Use
- Paste text with extra whitespace into the input.
- Click a trim mode button.
- Copy the cleaned text from the output panel.
FAQ
What does "Collapse Spaces" do?
It replaces any sequence of multiple spaces or tabs with a single space, cleaning up poorly formatted text.
Does "Trim Both" work per line?
Yes. Trim Both, Trim Start, and Trim End all operate on each line individually.