Skip to content

Remove Line Breaks

Join broken lines from PDFs and emails into paragraphs.

How to use the remove line breaks

Three steps, all in your browser.

  1. 1

    Add your text

    Type, paste or open a .txt file. Press Sample to try an example.

  2. 2

    Choose what to fix

    Switch options on or off. The cleaned text updates as you go.

  3. 3

    Copy or download

    Copy the result in one click or save it as a .txt file.

Remove Line Breaks: what to know

Remove Line Breaks joins broken lines back into flowing text. It's most useful for text copied from PDFs, emails and terminal output, where every printed line ends with a hard line break.

Choose how lines are joined: with a space (the usual choice for prose), with nothing (for long codes or IDs split over lines), or 'Keep paragraphs', which joins lines within each paragraph but keeps the blank lines between paragraphs.

Spaces around each line break are collapsed, so you don't end up with double spaces where lines were joined. Windows and Mac line endings are both handled.

Popular uses

  • Fixing paragraphs copied from PDF documents
  • Turning a list into one comma-free line for a search box
  • Joining a hash, key or code that was split over lines
  • Preparing text for tools that expect one line

Tips for the best result

  • Use 'Keep paragraphs' for articles so the structure survives.
  • Words hyphenated at the end of a PDF line keep their hyphen; check those afterwards.
  • To turn lines into a comma-separated list, remove the breaks with nothing, or use Find and Replace with regex: find \n and replace with a comma.

Read how JustYourText works and our privacy details. Text you type or paste is processed in your browser and is never sent to our server.

Frequently asked questions

Yes. Choose 'Keep paragraphs' to join the lines inside each paragraph while blank lines between paragraphs stay.

PDFs store each printed line separately, so copying keeps a break at the end of every line. Removing them turns the text back into flowing paragraphs.

No. Every tool runs in your browser, so the text you type or paste is processed on your device and is not sent to our server or stored. Reloading or closing the page clears it.

Yes. Every tool is free with no sign-up and no limits on use. Clearly labeled ads keep it that way.

Yes. The tools work in any modern browser on phones, tablets and computers. Copy and Download work on mobile too.