Trim Whitespace

Trim leading and trailing spaces from every line or every table cell. Handle non-breaking spaces, drop empty lines and reveal hidden whitespace characters visually.

  • Free, no sign-up
  • Runs in your browser
  • Your data stays private

How to use the Trim Whitespace

  1. Paste text or a table.
  2. Choose to trim each line, each cell or just the whole text, and which side.
  3. Copy the result or inspect the "Reveal whitespace" tab.

Why use this Trim Whitespace

  • Cell-level trimmingTrim spaces in every CSV or tab-separated cell without breaking the columns.
  • Reveal whitespaceSpaces, tabs and non-breaking spaces are shown as visible symbols.
  • Either sideTrim the start, the end or both.
  • Odd spacesTreats non-breaking and other unusual spaces as normal spaces.

Frequently asked questions

How do I remove spaces at the start and end of every line?

Choose "Each line" and "Both". Spaces at the start and end of each line are removed.

Can it trim cells in a CSV?

Yes. Choose "Each table cell" and the separator, or leave it on auto-detect.

What does the Reveal whitespace tab show?

It shows your original text with dots for spaces, arrows for tabs and symbols for hidden spaces so you can see the problem.

Related tools

More Text Formatting tools

User Reviews

–
No ratings yet
Write a review
Your rating *

Your email is never published. Reviews are moderated, and links aren't allowed.

What users are saying

No reviews yet

Be the first to share your experience with this tool — your feedback helps others.