Trim Lines
Trim Lines removes whitespace from the beginning and end of every line without changing interior spacing.
Example: trim lines
note
note
How to use this tool
- Paste multiline text into the tool.
- Run Trim Lines; each line edge is cleaned independently.
- Check meaningful indentation and blank lines before copying.
How the result is made
The tool splits input into lines, applies string trimming to each one, and rejoins them. A line containing “ note ” becomes “note”. Extra spaces between words remain as entered. A line made only of whitespace becomes empty but is not removed from the line sequence.
When to use it
Use it for list items copied from indented documents, spreadsheet cells with accidental edges, or files where interior columns must remain intact. Remove Extra Spaces also collapses repeated internal spaces. Remove Empty Lines deletes blank rows after trimming when you no longer need them.
Details to check
Trimming can remove indentation that has meaning in Markdown, code, or hierarchical lists. It also strips leading and trailing Unicode whitespace recognized by JavaScript, not only ASCII spaces. Review structured text before making the trimmed output authoritative.
Questions people ask
Are spaces between words changed?
No. Interior spacing is retained.
Do whitespace-only lines disappear?
They become empty lines but remain as line positions.
Is this safe for code indentation?
Not if indentation carries meaning; trimming removes it.