Text Trimmer
Trim leading or trailing whitespace on each line, or collapse repeated internal spaces and tabs. Keep mixed line endings in the downloaded UTF-8 file.
Remove Line Padding Without Changing Endings
Text Trimmer: how to use it
- Paste text or open a UTF-8 file to preserve its original line endings in the download.
- Choose which ends to trim, or trim both and collapse internal spaces and tabs.
- Review the changed-line count, then copy the result or download a text file.
Limits and notes
Accepts up to 200,000 UTF-16 code units. Trimming uses Unicode White_Space. The collapse mode replaces internal runs of ASCII spaces and tabs with one space. File downloads retain original line endings and any UTF-8 BOM.
How your privacy works →Text Trimmer: common questions
How do I trim the start of a line and keep spaces at the end?
Choose Trim the start. It removes whitespace before the first non-whitespace character and leaves any whitespace after the last character.
Which endings stay in place?
CRLF, LF, CR, NEL and Unicode line and paragraph separators stay in the order found in the uploaded file. The browser may display the first three as visually identical line breaks.
How can I remove extra spaces between words?
Choose Trim and collapse internal spaces. It trims both ends and replaces runs of spaces and tabs inside each line with one ordinary space.