TOOL GUIDE · LINE WHITESPACE
What counts as trimming
The input is split using common CRLF, CR, and LF newline sequences. Each line is passed through JavaScript’s trim operation, which removes leading and trailing whitespace for that line. The output joins the lines with LF characters. Empty lines remain in their positions, though whitespace that previously occupied a line is removed.
This is useful for cleaning accidental spaces around copied text, but indentation can convey structure in Python, YAML, Markdown, fixed-width records, or carefully formatted code. Review the source before running the tool if whitespace might be meaningful.
Check for unintended changes
- Keep an original copy when the text is important.
- Inspect blank lines and the first/last characters of representative rows.
- Compare line counts if downstream processing depends on record boundaries.
- Run the result through the destination parser or test.
For other line utilities, see Remove Duplicate Lines and Sort Lines.
The cleanup runs locally in this browser tab. It does not modify a file on your device unless you copy the result elsewhere.
