What this tool does
A focused tool for a specific cleanup job
Trim Whitespace can clean each line independently, strip only one side, remove outer padding from the whole document, or preserve indentation while still removing trailing spaces.
Common use cases
- Fix trailing spaces before a code review
- Clean columns copied from spreadsheets
- Normalize values before comparison
- Keep code indentation while removing line-end padding
How to use Trim Whitespace
- Paste the padded text.
- Select line trimming, whole-text trimming, or one-sided cleanup.
- Enable indentation preservation for code or nested lists.
- Inspect the output and copy it.
Options explained
- Trim each line removes whitespace on both sides of every line.
- Trim entire text touches only the outer boundary of the full paste.
- Preserve indentation prevents leading whitespace from being removed.
- Trailing-only cleanup is safe for indented content.
Example
Before
first
second After
first second
Edge cases and limitations
- Tabs are treated as whitespace.
- Preserved indentation may contain a mix of tabs and spaces.
- Blank lines remain unless another option removes them.