Loading…

How to use Trim Lines

Paste your text, and the tool strips leading and trailing spaces from the start and end of every line.

Frequently asked questions

What does 'trim' mean?

Trimming removes spaces, tabs, and other whitespace at the start or end of each line.

Does it affect middle of line?

No — only the very beginning and end of each line are trimmed.

Is this different from removing extra spaces?

Yes — trimming targets line edges only. Removing extra spaces targets all spaces within lines.

More Text Tools

Text Repeater
Repeat text N times with custom separator
Find & Replace
Find and replace text with regex or plain match
ROT13 Encoder
Encode or decode text using ROT13 cipher
Pig Latin Converter
Convert English text to Pig Latin and back
Text Randomizer
Shuffle words, sentences or lines randomly
Punctuation Remover
Strip all punctuation marks from your text
Case Converter
Convert text to UPPERCASE, lowercase, Title, camelCase, snake_case & more
Remove Accents & Diacritics
Strip accents and diacritics (café→cafe) and transliterate ligatures
Invisible Character Remover
Remove zero-width spaces, BOM & hidden characters from pasted text
Strip HTML Tags
Remove all HTML tags and decode entities to get clean plain text
Remove Numbers
Strip all digits (or all non-digits) from your text
Remove Line Breaks
Collapse line breaks into spaces or join text into one line

← View all Text ToolsBrowse all 1,100+ tools →