Back to Tools

Trim Whitespace

Processed Locally

Remove whitespace from text in various ways: trim start/end, remove all spaces, normalize multiple spaces, or remove blank lines.

Options

Frequently Asked Questions

Trim Both: removes spaces from start and end. Trim Start/End: removes from one side only. Remove All: strips all spaces/tabs. Normalize: compresses multiple spaces to one. Blank Lines: removes empty lines.
When enabled, line breaks (newlines) are kept even in "Remove All" and "Normalize" modes. When disabled, line breaks are also removed, treating the entire text as a single line.
Normalize mode compresses sequences of multiple spaces or tabs into a single space. With line breaks preserved, it normalizes each line separately. This is useful for cleaning up inconsistent spacing in text.
A blank line is a line that is either completely empty or contains only whitespace characters (spaces, tabs). The "Remove Blank Lines" mode removes all such lines, leaving only lines with actual content.