Home › Text Tools › Remove Line Breaks

Remove Line Breaks

Paste text copied from a PDF, email or web page and turn broken lines back into clean paragraphs. Choose what replaces the line breaks, keep paragraph breaks, fix hyphenated words and tidy spaces in one go.

Replace each line break with
0 lines · 0 characters
0 lines · 0 characters

Your text is processed in your browser and never uploaded.

Advertisement

How to use the Remove Line Breaks

  1. Paste your text into the input box, or press Sample to see how it works.
  2. Choose a mode. Remove line breaks joins lines; Remove empty lines only keeps every line but deletes blank ones.
  3. Pick what replaces each line break: a space (best for normal text), nothing, or a custom separator such as a comma.
  4. Tick the clean-up options you need: keep paragraphs, fix hyphenated words, trim lines and remove extra spaces.
  5. Copy or download the cleaned text. The output updates as you type.

What each option does

OptionBeforeAfter
Replace with a spaceThe quick brown↵fox jumpsThe quick brown fox jumps
Replace with nothinga1b2c3↵d4e5f6a1b2c3d4e5f6
Custom separator ", "apples↵pears↵plumsapples, pears, plums
Preserve paragraph breaksLine one↵line two↵↵New paragraphLine one line two↵↵New paragraph
Fix hyphenated wordsan exam-↵ple sentencean example sentence
Remove extra spacestoo   many  spacestoo many spaces
Remove empty lines onlyone↵↵↵two↵↵threeone↵two↵three

The ↵ symbol stands for a line break. A custom separator can include \n for a new line or \t for a tab, which is handy for turning a comma list back into lines.

Line break characters this tool recognises

NameCodeWhere you see it
Line feed (LF)\n, U+000ALinux, macOS, most web text
Carriage return + line feed (CRLF)\r\nWindows files, emails
Carriage return (CR)\r, U+000DClassic Mac OS, some old exports
Next line (NEL)U+0085Text converted from EBCDIC systems
Line separatorU+2028Word processors, some PDFs and JSON
Paragraph separatorU+2029Word processors (treated as a paragraph break)

Tips for cleaning copied text

  • From PDFs: use a space, keep paragraph breaks and fix hyphenated words. Then skim for compound words such as "well-known" that were split across lines.
  • From emails: old plain-text emails wrap at about 72 characters. Joining lines with spaces restores the original paragraphs.
  • For spreadsheets or code: join a column of values with a comma, or with nothing to rebuild a long string that was wrapped.
  • For subtitles or poems: use Remove empty lines only to tighten the spacing without merging lines.

Frequently asked questions

How do I remove line breaks from text copied from a PDF?

Paste the text into the input box, choose Remove line breaks and replace them with a space. Keep the Preserve paragraph breaks option ticked so real paragraphs stay separate, and tick Fix hyphenated words to rejoin words that were split at the end of a line.

What is the difference between a line break and a paragraph break?

A line break ends one line and starts the next. A paragraph break is usually two line breaks in a row, which leaves an empty line between blocks of text. This tool can remove single line breaks while keeping the double ones, so paragraphs survive.

Why does text from a PDF have line breaks everywhere?

PDFs store text as positioned lines, not flowing paragraphs. When you copy it, every visual line ends with a hard line break, so the text no longer reflows in an email, document or web form.

Can I turn a list into a comma-separated line?

Yes. Choose Custom separator, enter a comma followed by a space, and untick Preserve paragraph breaks. A list with one item per line becomes a single line such as apples, pears, plums.

What are CRLF, LF and CR?

They are the invisible characters that end a line. Windows uses CR + LF (\r\n), Linux and macOS use LF (\n) and very old Macs used CR (\r). The tool recognises all of them, plus the Unicode line separator U+2028 and paragraph separator U+2029.

Will fixing hyphenated words break real hyphens?

Only hyphens at the very end of a line followed by a lowercase letter are joined, so exam-/ple becomes example. A hyphenated compound that happens to fall at a line end, such as well-/known, would also be joined, so check the result if your text has many of those.

Is my text uploaded anywhere?

No. All processing happens in your browser and the text never leaves your device.

Related tools