Trim Whitespace

Remove leading and trailing whitespace from text.

Input data is processed in your browser
Data is never sent to a server

Tool

0 lines

or drag & drop a file

What is Trim Whitespace?

Trim Whitespace removes unnecessary spaces and whitespace from the beginning or end of text. It is useful for cleaning up extra spaces introduced by copy and paste or tidying data.

How to Use

  1. Enter text in the input field.
  2. Select the trim mode (both ends, start only, end only, or all whitespace).
  3. Click "Trim" to see the result.
  4. Click "Copy Result" to copy to clipboard.

FAQ

Are full-width spaces supported?

Yes. Enable the "Include full-width spaces" option to also remove Japanese full-width spaces.

What does "trim per line" mean?

It trims leading and trailing whitespace from each line individually, rather than just the start and end of the entire text.