Docomint

Whitespace Trimmer

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

🔒 Processed on your device

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.

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.

How it works

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

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