Docomint

Whitespace Trimmer

Trim leading and trailing spaces from every line of text at once.

🔒 Processed on your device

What is a Whitespace Trimmer?

Different from Remove Extra Spaces: this specifically trims the start and end of every line, which is what you want when a list was copy-pasted with inconsistent indentation rather than extra spaces mid-line.

How to use the Whitespace Trimmer

  1. Paste indented or padded text
  2. Each line's edges are trimmed instantly, on your device
  3. Copy the tidy result

Example

A list copy-pasted from a PDF with inconsistent leading and trailing spaces on each line comes back with every line's edges trimmed to a clean, consistent left margin.

Frequently asked questions

What happens to blank lines?

A blank line stays blank — only leading and trailing spaces on lines that have content are removed.

Is my text uploaded anywhere?

No — Whitespace Trimmer runs entirely in your browser using JavaScript/WebAssembly. Your text is never sent to a server.

Does this remove blank lines entirely, or just trim their spaces?

A line that's only whitespace gets trimmed down to a genuinely empty line, but it isn't deleted — use Remove Empty Lines afterward if you also want those gone.

Related tools