Text Tools
Trim Lines
Trim leading, trailing, or both sides of whitespace on every line. Free online line trimmer for lists, code, and pasted text.
Loading tool…
How to use
- Paste your text
- Choose trim side: both, start, or end
- Copy the trimmed result
Next step
- Remove Empty Lines
Remove blank and whitespace-only lines from text. See how many lines were removed. Free online empty line remover.
- Whitespace Cleaner
Clean whitespace: collapse multiple spaces, normalize line endings, convert tabs to spaces, or strip all whitespace. Free online whitespace tool.
- Add Prefix/Suffix
Add a prefix and/or suffix to every line. Optionally skip empty lines. Handy for bullets, quotes, SQL lists, and bulk formatting.
Frequently asked questions
What is trimmed?
Spaces, tabs, and other Unicode whitespace at the start and/or end of each line, depending on the side option.
Does trimming affect blank lines?
Blank or whitespace-only lines become empty lines after “both” trimming. Use Remove Empty Lines to delete them afterward.
Is my text uploaded?
No. Trimming runs locally in your browser.