How to use it
- Paste the text into the first box.
- Choose what should happen to line breaks:
- Join lines, keep paragraphs (default): single line breaks inside a paragraph become spaces, and empty lines between paragraphs are kept. This is what you want for text copied from a PDF.
- Remove all line breaks: everything becomes one line. The Replace breaks with option controls whether lines are joined with a space or with nothing.
- Only remove empty lines: keeps every line but deletes blank ones.
- Keep line breaks: leaves lines alone and only applies the space and trim options.
- Leave Collapse extra spaces on to turn runs of spaces, tabs and non-breaking spaces into a single space. Leave Trim each line on to remove spaces at the start and end of lines.
- Click Clean text and copy the result.
Worked example: text copied from a PDF
PDF viewers copy text line by line, so a paragraph arrives like this:
The quarterly report shows that
costs fell slightly while
revenue stayed flat.
Next steps are listed below.
With the default settings the result is:
The quarterly report shows that costs fell slightly while revenue stayed flat.
Next steps are listed below.
The broken lines are joined, the double space after costs is collapsed, and the paragraph break is preserved.
Other common uses
- Turning a list of values (one per line) into a single line before pasting it into a spreadsheet cell or search box.
- Cleaning email replies that were hard-wrapped at 72 characters.
- Removing blank lines from log output or copied code so it fits on screen.
- Fixing subtitles or transcripts where every sentence is split across lines.
Common problems
- Hyphenated words split across lines. If a PDF broke informa- / tion across two lines, joining gives informa- tion. The tool does not guess whether the hyphen belongs to the word, because words like well-known must keep theirs. Search for
-in the result and fix these by hand. - Paragraphs merged together. "Join lines, keep paragraphs" needs an empty line between paragraphs. If your source has none, every line will be joined. Add blank lines where paragraphs should break, or use "Keep line breaks".
- Words glued together. If you chose to replace breaks with nothing, words at line ends join up. Switch back to "a space".
- Windows vs Unix line endings. Both
\r\nand\nare handled, so text from any operating system works.
Frequently asked questions
How do I remove line breaks but keep paragraphs?
Choose Join lines, keep paragraphs. Single line breaks become spaces, while empty lines between paragraphs are preserved.
Why does text copied from a PDF have line breaks everywhere?
PDFs store text as positioned lines, not flowing paragraphs. When you copy, each visual line ends with a line break, which this tool joins back together.
Can I replace line breaks with commas?
This tool joins lines with a space or with nothing. To get commas, remove the line breaks with a space and then use find and replace in your editor, or paste the list into a spreadsheet.
Does it remove tabs and non-breaking spaces?
With Collapse extra spaces turned on, runs of spaces, tabs and non-breaking spaces are reduced to a single normal space.
Is my text uploaded anywhere?
No. All processing happens in your browser, and nothing is sent to a server.