Remove leading and trailing whitespace from every line instantly. Trim start, trim end or both — with optional empty line removal. Free, runs in your browser — no data sent to a server.
Word Counter Online — Count Words, Characters & Reading Time
Count words, characters, sentences, paragraphs, unique words and reading time in real time. Free online word counter — paste your text and get instant statistics.
Remove Line Breaks Online — Strip Newlines from Text
Remove unwanted line breaks from any text instantly. Keeps paragraph structure intact or strips all newlines at once. Free, runs in your browser — no data sent to a server.
Remove Duplicate Lines Online — Deduplicate Text Instantly
Remove duplicate lines from any list or text instantly. Case-sensitive option, empty line removal and live duplicate count. Free, runs in your browser — no data sent to a server.
Sort Lines Online — Alphabetical & Reverse Text Sorter
Sort lines of text alphabetically, in reverse order or by natural sort. Case-sensitive option and empty line removal included. Free, runs in your browser — no data sent to a server.
Case Converter Online — camelCase, snake_case, Title Case & More
Convert text between 8 case formats instantly: UPPERCASE, lowercase, Title Case, camelCase, PascalCase, snake_case, kebab-case and Sentence case. Free, runs in your browser.
Add Line Numbers Online — Free Line Numbering Tool
Add line numbers to any text instantly. Configure start number, separator style and zero padding. Free, works in your browser — no data sent to a server.
A free online tool to remove leading and trailing whitespace from every line in your text. Trim the start, the end or both sides independently — with optional empty line removal. Works with code, CSV exports, log files and any multiline content. Runs entirely in your browser — no data is sent to any server.
Paste your text into the line trimmer
Type or paste any text into the input field. The tool works with code, CSV data, copied spreadsheets, log files or any multiline text with inconsistent indentation or trailing spaces.
Choose what to trim
Trim start removes leading spaces and tabs from the beginning of each line. Trim end removes trailing whitespace from the end. Both are enabled by default for a full trim — disable either to trim only one side.
Optionally remove empty lines
Toggle Remove empty lines to strip lines that are blank after trimming. Useful when cleaning exported data or pasted content with irregular spacing between items.
Copy the clean result
The output updates instantly as you type or toggle options. Click Copy to grab the trimmed text and paste it into your editor, terminal or document.
Paste your text into the input field. With Trim start and Trim end both enabled (the default), all leading and trailing whitespace is stripped from every line instantly. Click Copy to grab the cleaned result.
Yes. Disable Trim end to remove only leading spaces, keeping trailing whitespace intact. Disable Trim start to remove only trailing spaces. Both toggles work independently, giving full control over which side is trimmed.
The tool removes spaces and tab characters from the start and end of each line. It does not remove whitespace from within the line — words and internal spacing are preserved exactly as written.
No. All processing happens locally in your browser — no text is transmitted to any server. The tool works offline and your content stays entirely on your device.
Trailing spaces often appear in copied spreadsheet data, exported CSVs and pasted code. They are invisible but can cause issues in databases, version control diffs and string comparisons. Trimming lines removes them silently before they cause problems.