How to use
- Paste text with unwanted line breaks. It usually comes from a PDF, an email, a terminal or a subtitle file.
- Choose a mode. Keep paragraphs is the right choice most of the time.
- Copy the result or save it with Download .txt.
Modes compared
For the input first line⏎second line⏎⏎new paragraph (⏎ = line break):
| Mode | Result | Use it when |
|---|---|---|
| Keep paragraphs | first line second line, a blank line, then new paragraph |
You want to restore the paragraphs in text copied from a PDF or email |
| Replace with spaces | first line second line new paragraph |
You need everything on one line, for example in a form field or spreadsheet cell |
| Remove completely | first linesecond linenew paragraph |
Nothing can go where the break was, such as a long ID or key split across lines |
Options
- Collapse multiple spaces turns runs of spaces and tabs into a single space and trims each line. It also cleans up the indentation PDFs often add at the start of lines.
- Rejoin hyphenated words (English) turns
exam-⏎pleback intoexample. It only kicks in when a line ends with a letter followed by a hyphen and the next line starts with a lowercase letter, soCOVID-⏎19is left alone.
Good to know
- Hyphen rejoining can’t tell a word split at the end of a line from a real compound word, so
well-⏎knownbecomeswellknown. Turn the option off for text with lots of hyphenated compounds. - Lines are joined with a space, which is right for English, Korean and other languages that put spaces between words. For Chinese or Japanese text, use Remove completely instead.
- Windows (CRLF), classic Mac (CR) and Unix (LF) line endings are all recognized. Line breaks at the very start and end of the text are removed.
FAQ
Why does text copied from a PDF have line breaks everywhere?
PDFs usually store text as lines placed on the page rather than as flowing paragraphs, so when you copy it, you get a hard break at the end of every line you see.
Can I check the word or character count afterwards?
The character count of the result is shown below it. For words, bytes and characters without spaces, use the character counter.
Can I see exactly what changed?
Paste the original and the cleaned-up text into text diff to compare them.