Remove Line Breaks Tool

Join broken lines from PDFs and emails into clean paragraphs

Remove unwanted line breaks from text copied from PDFs, emails or documents, keep paragraphs or join everything, rejoin hyphenated words and collapse extra spaces.

Everyday UseUpdated October 21, 2026Checked against 6 reference values

What this tool does

Text copied from PDFs, emails, old documents and terminal output often has a hard line break at the end of every line. Pasted into a document, a form or a website, it shows up as short, ragged lines. This tool removes those breaks and joins the lines back into flowing text. It can keep your paragraph breaks, remove every break, or join lines with a separator of your choice, such as commas to turn a column into a list. It can also rejoin words that were split with a hyphen at the end of a line and tidy up extra spaces.

How it works

Paragraph mode: single line breaks become spaces; blank lines stay as paragraph breaks

Windows text uses a carriage return and line feed at the end of each line, while macOS and Linux use only a line feed, so the tool first converts all line endings to one form. In paragraph mode, any run of blank lines marks a new paragraph and is kept as a single blank line. Hyphen rejoining only joins a hyphen at the very end of a line followed by a lowercase letter, which matches how typesetters split words.

Examples

Fixing PDF text. Three short lines and a two-line paragraph become: The quick brown fox jumps over the lazy dog. followed by A second paragraph. as a separate paragraph.

Column to list. Apples, bananas and cherries on separate lines, joined with a comma separator, become apples, bananas, cherries.

Common uses

  • Cleaning up text copied from PDF files, scanned documents and ebooks.
  • Fixing quoted emails that wrap at about 72 characters per line.
  • Turning a column copied from a spreadsheet into a comma-separated list for a search, email or SQL query.
  • Preparing text for translation tools, which can mistranslate sentences split across lines.
  • Pasting into social media posts and forms that treat each line break as a new paragraph.

Things to check

Hyphen rejoining cannot tell a split word from a genuine hyphenated compound that happens to fall at a line end, so "well-known" broken after the hyphen would become "wellknown". Turn the option off for text with many compound words, or check the result. Lists, addresses and poetry rely on their line breaks, so use paragraph mode or leave those sections out. Tables copied from PDFs usually need more cleanup than simply removing the line breaks.

Doing it in other apps

Most word processors can do the same job with find and replace. In Microsoft Word, searching for ^p^p and replacing it with a placeholder, then replacing ^p with a space, and finally turning the placeholder back into ^p^p, removes single breaks while keeping paragraphs. Text editors that support regular expressions can replace \n with a space. Spreadsheets have TEXTJOIN for combining a column with a separator. This tool does all of that in one step, which is quicker for occasional cleanups and avoids mistakes with placeholders. For text you clean up often, a saved macro or editor shortcut can be worth setting up.

Privacy

The text is processed in your browser and saved only on this device so it is still here if you reload the page. Nothing is ever uploaded to a server. Use Reset to clear it when you are finished, especially on a shared or public computer. Because the cleaning happens locally, it also works for confidential documents that should not be pasted into online services that store what you send them.

Remove Line Breaks Tool: common questions

How do I remove line breaks but keep paragraphs?

Choose Line breaks inside paragraphs. Single breaks become spaces, and blank lines between paragraphs are kept.

Why does text from PDFs have line breaks?

PDFs store text positioned line by line, so copying it usually adds a break at the end of each visual line.

Can I turn lines into a comma-separated list?

Yes. Choose All, replaced with my separator, and set the separator to a comma and space.

What does rejoin hyphenated words do?

It joins words split with a hyphen at the end of a line, such as exam- and ple, back into example.

Is my text uploaded?

No. Everything happens in your browser, and the text is only saved on this device.

Sources