1. Home
  2. Text
  3. Remove Line Breaks

Remove Line Breaks

Fix broken lines in text from PDFs and emails while keeping your paragraphs.

Runs in your browser · No upload
Blank lines between paragraphs stay; single line breaks inside a paragraph become spaces. Ideal for text copied from PDFs.
Result
When you copy text from a PDF, every line often ends with a hard line break, and long words get hyphenated across lines. This tool joins those lines back into paragraphs while keeping the blank lines between them.
Lines before
6
Lines after
3
Breaks removed
3
Characters
214

How to use

  1. Paste text with unwanted line breaks. It usually comes from a PDF, an email, a terminal or a subtitle file.
  2. Choose a mode. Keep paragraphs is the right choice most of the time.
  3. 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-⏎ple back into example. It only kicks in when a line ends with a letter followed by a hyphen and the next line starts with a lowercase letter, so COVID-⏎19 is 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-⏎known becomes wellknown. 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.

Can't find the tool you need?

Tell us what you want to do. We build the most requested tools first.