Remove leading and trailing whitespace from every line — trim start, end or both. Free, browser-based, with optional empty-line removal and no data sent anywhere.
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 text instantly. Keep paragraph structure or strip every newline 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, with a live count of duplicates removed. Free, browser-based, no data sent to a server.
Sort Lines Online — Alphabetical & Reverse Text Sorter
Sort lines of text alphabetically, in reverse or by natural sort — free and browser-based, with case-sensitive matching and empty-line removal built in.
Case Converter Online — camelCase, snake_case, Title Case & More
Convert text between 8 case formats instantly — UPPERCASE, camelCase, snake_case, kebab-case and more. Free, browser-based, no data sent to a server.
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.
This tool strips all leading and trailing whitespace from every line as soon as you paste text. Trim start and Trim end are both on by default, so full trimming happens automatically — click Copy when you're ready to grab the result.
Disabling Trim end removes only leading spaces and keeps trailing whitespace intact. Disabling Trim start does the opposite, removing only trailing spaces — the two toggles work independently, so you get 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.
All text processing happens locally in your browser, so nothing you paste is ever sent to a server. The tool keeps working fully offline once the page has loaded, and your content never leaves 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.
Yes — clicking Load example fills the input with six lines covering different whitespace patterns. Running it through the default settings shows exactly which spaces and tabs get trimmed from each line.