Trim Whitespace from Lines
Clean up copied lists with padding at the start or end of individual lines.
Result
How to use
- Paste one record per line when you want to remove spacing at the outside edges.
- Select Convert to generate the output.
- Review the output before copying it.
How it works
Clean up copied lists with padding at the start or end of individual lines. Trim leading and trailing whitespace separately on each line.
Formula or processing rules
Trim leading and trailing whitespace separately on each line.
Worked example
A line containing two leading spaces before alpha prints as alpha.
| Measure | Value |
|---|---|
| Source text | alpha beta |
| Result | alpha beta |
Pros and cons
Pros
Clean up copied lists with padding at the start or end of individual lines. The sample provides an immediate check of the expected output.
Cons
Intentional indentation is removed. Avoid this tool when leading spaces represent nested structure.
Limitations and troubleshooting
Avoid trimming when leading spaces carry meaning, such as indentation in a code sample.
Reduce unwanted internal whitespace
Frequently asked questions
Does trimming align the words inside a line?
Trimming targets leading and trailing whitespace. It does not align columns or edit internal spacing.
What rule does the Trim Whitespace from Lines apply?
Trim leading and trailing whitespace separately on each line.
What should I see in the Trim Whitespace from Lines example?
A line containing two leading spaces before alpha prints as alpha.
What should I verify after using Trim Whitespace from Lines?
Intentional indentation is removed. Avoid this tool when leading spaces represent nested structure.
Is my input stored by the tool?
The transformation is computed in the open page. The tool does not save the submitted text.