Fix wrapped PDF prose
BeforeA PDF may wrap text in the middle of a sentence. A new paragraph stays separate.After
A PDF may wrap text in the middle of a sentence. A new paragraph stays separate.
Private: Processing happens locally in your browser. No text or file is uploaded. Clearing the tool or closing this page removes the working text.
You can also load a plain-text file. Its contents remain on this device.
Drop a .txt file here or
The file is read only in your browser.
Check structured text carefully. Line breaks and indentation may be meaningful in code, YAML, Markdown, poetry, addresses, JSON strings, and other structured data.
The original stays unchanged so you can compare it with the result. Select text in this box normally, or use Copy result.
Add text and select Clean text to see what changed.
Keyboard tip: Ctrl/Cmd + K focuses the input. Ctrl/Cmd + Enter cleans it.
A PDF may wrap text in the middle of a sentence. A new paragraph stays separate.After
A PDF may wrap text in the middle of a sentence. A new paragraph stays separate.
apples pears orangesAfter
apples, pears, oranges
First line Second lineAfter
First line Second line
Text copied from PDFs, Word documents, websites, emails, and spreadsheets can contain hard wraps and invisible formatting. This tool normalizes Windows CRLF, old Mac CR, and Unix LF line endings before applying the options you select. Preserve paragraphs is useful for PDF prose: it joins visual line wraps inside each paragraph while keeping blank-line boundaries.
The join mode controls line breaks; More options control the other characters. In these examples, ⏎ means a line break, ⇥ means a tab, and · means a normal space.
| Input item | Join all lines | Preserve paragraphs | Relevant option |
|---|---|---|---|
| Single line break | one⏎two → one·two | one⏎two → one·two | Space, comma, or custom separator |
| Blank line | one⏎⏎two → one·two | one⏎⏎two → one⏎⏎two | Remove blank lines overrides preservation |
| Several blank lines | one⏎⏎⏎two → one·two | one⏎⏎⏎two → one⏎⏎two | Collapse multiple blank lines |
| Tab | one⇥⇥two → one·two | Collapse repeated spaces and tabs | |
| Repeated spaces | one···two → one·two | Collapse repeated spaces and tabs | |
| Leading/trailing whitespace | ·one· → one | Trim each line | |
| Non-breaking space | one[NBSP]two → one·two | Convert non-breaking spaces | |
| Zero-width character | one[ZWSP]two → onetwo | Remove zero-width characters | |
| Any whitespace | one·two⏎three → onetwothree | Remove all whitespace overrides join settings | |
No. Text and local .txt files are processed only in your browser and are not sent to Starlight Tools. Clearing the tool or closing the page removes the working text.
It joins single line breaks inside each paragraph using your selected separator, while keeping blank-line paragraph boundaries. With Collapse multiple blank lines enabled, every paragraph boundary becomes one blank line.
Choose Comma or Custom separator under Replace joined breaks with. Enter any custom text you need, then select Clean text.
PDFs often store text by its visual lines rather than as flowing paragraphs. Copying can preserve those line endings, so sentences wrap in the wrong places.
Collapsing spaces keeps one normal space between words. Remove all whitespace deletes spaces, tabs, and line breaks, so words run together.
There is no fixed server limit because nothing is uploaded. The practical limit depends on your browser and device memory, and very large files may process more slowly.
Yes. The tool, local file picker, copy action, and download action work in modern mobile browsers, subject to browser permissions.
Yes. Line breaks, spaces, and indentation can be meaningful in code, JSON strings, YAML, Markdown, poetry, addresses, and other structured text. Compare the result before using it.