Trim Lines worked example
{
"source": " first line \n\tsecond line\t\n third line "
}
{
"result": "first line\nsecond line\nthird line",
"change_count": 3,
"line_count": 3
}
Text Tools
Remove leading and trailing whitespace from every line.
Published Last reviewed
Remove leading and trailing whitespace from every line. Enter text in a purpose-built trim lines interface designed for this subject. Leading and trailing Unicode whitespace is removed from each line independently. The result includes result, changes, lines, supporting detail, and clear units or diagnostics. Results depend on the entered assumptions, units, and rounding. Review important decisions against authoritative requirements. Processing stays in your browser, and UtilityPages does not store the values you enter.
Workspace
Edit the source fields below and inspect the rendered output alongside your work.
This workspace updates as you edit.
Enter the values above, then transform to see a detailed result.
Leading and trailing Unicode whitespace is removed from each line independently.
Leading and trailing Unicode whitespace is removed from each line independently. Results depend on the entered assumptions, units, and rounding. Review important decisions against authoritative requirements.
{
"source": " first line \n\tsecond line\t\n third line "
}
{
"result": "first line\nsecond line\nthird line",
"change_count": 3,
"line_count": 3
}
This tool does not store your inputs or results on UtilityPages.org.
Leading and trailing Unicode whitespace is removed from each line independently.
Enter text. Use values and units from the same scenario so the result is internally consistent.
It reports result, changes, lines, including intermediate context where it helps you review the answer.
Results depend on the entered assumptions, units, and rounding. Review important decisions against authoritative requirements.