Remove Line Breaks
Paste text that arrived chopped into short lines and get clean, continuous paragraphs back. Lines are trimmed and joined, blank lines can stay as paragraph breaks, and everything happens locally in your browser.
0 characters · 0 words · 0 lines
0 characters · 0 words · 0 lines
Runs entirely in this browser tab. Your text is never uploaded or stored.
What it does
Remove Line Breaks joins hard-wrapped lines into continuous text. Lines are trimmed and joined with a space (or with nothing for languages written without spaces); blank lines can be kept as paragraph breaks, and runs of spaces can be collapsed.
first line of a wrapped sentence
first line of a wrapped sentence
Where unwanted line breaks come from
A PDF does not store paragraphs. It stores lines of text placed at fixed positions on a page, so when you copy from it, every line of the printed column usually arrives with its own break. Plain-text email has a similar history: RFC 5322 caps a line at 998 characters and recommends no more than 78, so many mail programs wrap messages at around 72 to 76 characters, and the breaks stay when the text is pasted elsewhere. Terminal output, subtitles, OCR results and text copied from narrow web columns behave the same way.
Pasted into a document, a form or a translation tool, those breaks split sentences in the middle and confuse spell checkers and machine translation. Joining the lines restores sentences, and keeping blank lines as separators preserves the paragraph structure the author meant.
CRLF, LF and CR: why line endings differ
Line endings go back to typewriters and teleprinters, where a carriage return (CR) moved the print head back to the left margin and a line feed (LF) advanced the paper one line. Windows kept both characters, so its text files end each line with CRLF; Unix, Linux and modern macOS use LF alone; classic Mac OS before OS X used CR alone. Text moving between systems often mixes them, which is why a file can look single-spaced in one editor and double-spaced or run together in another.
This tool treats all three as line breaks, so you never need to know which one your text contains. With the paragraph option on, a line that is empty or holds only spaces and tabs marks a paragraph boundary; the paragraphs are written back separated by one blank line, using LF.
Options and things to check
Join with a space for English and other languages written with spaces between words; join with nothing for Chinese, Japanese and Thai, where an extra space would sit in the middle of a sentence. Collapse spaces turns the double and triple spaces left behind by justified PDF text into single ones. One thing the tool deliberately leaves alone is a hyphen at the end of a line: "infor-" followed by "mation" becomes "infor- mation", because only a person can tell a broken word from a real hyphenated compound such as "well-known". Search for "- " afterwards to fix those. If the cleaned text is a list, continue with Remove Duplicate Lines, or check its length in the Word Counter.
Frequently asked questions
- How do I remove line breaks but keep paragraphs?
- Leave the keep-paragraphs option on. Single breaks inside a paragraph are replaced with a space, while a blank line between paragraphs is kept, so the text still has its paragraph structure.
- Why does text copied from a PDF have a break after every line?
- PDF stores text as positioned lines on a page, not as flowing paragraphs. Most viewers copy those lines exactly as laid out, so each printed line ends with a hard break.
- What is the difference between CRLF and LF?
- CRLF is the two-character line ending used by Windows (carriage return plus line feed); LF is the single character used by Unix, Linux and macOS. Both are recognized here.
- Should I join lines with a space or with nothing?
- Use a space for languages that separate words with spaces. Use nothing for Chinese, Japanese or Thai text, or for long strings such as keys or Base64 that were wrapped at a fixed width.