Skip to content

Text Cleaner

Paste messy text and PocketSpry cleans up its whitespace instantly in your browser — trim spaces and tabs from the start and end of each line, collapse repeated spaces and tabs inside lines, and keep, collapse, or remove blank lines. It is whitespace cleanup only: it never sorts, dedupes, rewrites, changes case, or fixes grammar, so your wording and line order stay exactly as you wrote them, and your text is not sent to PocketSpry’s AI service.

Paste the text to clean. Processed in your browser — it is not sent to PocketSpry’s AI service or to analytics. Your wording, line order, and duplicate lines are preserved.
Trim removes spaces and tabs from the start and end of each line; Keep leaves them untouched.
Collapse turns a run of two or more spaces/tabs inside a line into one space; Keep leaves them untouched.
Keep every blank line, collapse each run of blank lines to one, or remove all blank lines.

Clean pasted text instantly

Paste text copied from a PDF, email, spreadsheet, or web page and PocketSpry removes the unwanted whitespace while keeping your wording intact — locally in your browser, with no sign-up and no upload.

Trim line edges

Trim removes ASCII spaces and tabs from the start and end of each line. Other whitespace characters (such as a non-breaking space) are left alone, since they can be meaningful.

Collapse repeated spaces and tabs

Collapse turns a run of two or more spaces and/or tabs inside a line into a single space. A single space or a single tab is left untouched, and line breaks are never affected.

Clean up blank lines

Choose how blank lines are handled: Keep leaves them as they are, Collapse repeats reduces each run of blank lines to a single empty line, and Remove deletes all blank lines.

Preserve wording and order

Text Cleaner changes whitespace only. It does not sort lines, remove duplicate lines, rewrite or paraphrase text, change capitalization, fix grammar or spelling, or remove punctuation — your content and its order stay exactly as written.

Whitespace-only lines

A line that contains only whitespace counts as a blank line for the Collapse repeats and Remove options — even when Line edges is set to Keep.

Newline normalization

Windows (CRLF) and old-Mac (CR) line endings are normalized to LF for consistent, deterministic output. Whether your text ended with a final newline is preserved as a single trailing newline.

Private and browser-local

Your text is cleaned locally in your browser. It is not sent to PocketSpry’s AI service, and neither your text nor the cleaned result is sent to analytics.

Text Cleaner vs other PocketSpry tools

Text Cleaner handles whitespace structure only. To sort or remove duplicate lines, use Sort & Dedupe Lines; to make specific replacements (including regular expressions), use Find & Replace. Text Cleaner does not rewrite or grammar-check your text.

Frequently asked questions

What does Text Cleaner do?
It tidies up the whitespace in pasted text — line edges, repeated spaces, and blank lines.
What does it change?
Only whitespace: line-edge spacing, repeated spaces/tabs, blank lines, and line endings.
What does it NOT change?
It never sorts, dedupes, rewrites, changes case, fixes grammar/spelling, removes punctuation, or strips HTML.
Does it trim spaces at the beginning and end of lines?
Yes, when Line edges is set to Trim (the default).
Can I keep line-edge spaces?
Yes — set Line edges to Keep.
Does it collapse repeated spaces?
Yes, when Repeated spaces & tabs is set to Collapse.
Does it collapse tabs?
A run of two or more spaces/tabs collapses to one space; a single isolated tab is left as-is.
Does it remove blank lines?
It can: choose Keep, Collapse repeats, or Remove for blank lines.
What counts as a blank line?
A line that contains only whitespace.
Does it preserve line order?
Yes, always.
Does it remove duplicate lines?
No — use Sort & Dedupe Lines for that.
Does it sort lines?
No.
Does it change capitalization?
No.
Does it fix grammar or spelling?
No.
Does it remove punctuation?
No.
Does it strip HTML?
No — HTML-like text is kept as literal text.
What happens to CRLF / Windows line endings?
They are normalized to LF.
Does it preserve a final newline?
Yes — as one LF if your text ended with a newline.
Can whitespace-only text be cleaned?
Yes.
Can the result be empty?
Yes — if cleanup removes all content, an empty result is a valid success.
Does my text leave my browser?
No.
Is it sent to AI?
No. This tool does not use AI and makes no server or AI call.
Does PocketSpry send my text or settings to Plausible?
No. Your text, the cleaned result, and your settings are not sent to analytics.
What is the maximum input size?
200,000 characters.
Is the result AI generated?
No. It is computed deterministically in your browser.