WeblixTools
100% In-Browser • Free, No Sign-Up

Remove Line Breaks from Text

Text copied out of a PDF, an old email or a terminal often arrives chopped into short lines. Paste it here and get clean, flowing paragraphs back, or join a column of items into one line.

10 lines · 318 characters

Options

Lines inside a paragraph are joined with a space; a blank line still starts a new paragraph.

10
Lines before
5
Lines after
318
Characters before
318
Characters after

Paragraphs survive

Keep paragraphs joins broken lines but leaves blank-line breaks in place.

Before and after counts

See how many lines and characters you had and how many are left.

Nothing is uploaded

The text is processed in this tab. Close it and the text is gone.

Fix text that breaks in the wrong places

PDFs don't store paragraphs, they store lines of text placed on a page. When you copy from one, every line ends with a hard break, so a sentence pasted into Word, a CMS or a chat box stops halfway across the screen and carries on below. Plain-text emails do the same thing because many mail programs wrap lines at around 72 characters.

The default setting, Keep paragraphs, deals with exactly that. Lines that belong together are joined with a space, and a blank line still marks the start of a new paragraph, so the structure of the original survives. If you want one single block instead, pick Remove all. Replace with lets you choose what goes between the lines: type a comma and a space to turn a column of email addresses into a list you can paste into the To field, or \t to get tab-separated values for a spreadsheet.

The result updates while you type or change an option. Windows line endings (\r\n), old Mac endings (\r) and Unix endings (\n) are all recognised, so files from any system work the same way.

How to use it

  1. 1Paste your text, open a .txt file, or press Sample to see how it works.
  2. 2Choose Remove all, Keep paragraphs or Replace with.
  3. 3Turn on Rejoin words split by a hyphen if the text came from a justified PDF.
  4. 4Check the before and after line counts, then copy or download the result.

What each option does

  • Collapse repeated spaces (on by default): any run of two or more spaces or tabs becomes one space. Handy when the source used spaces to line things up.
  • Trim each line (on by default): spaces at the start and end of every line are removed before the lines are joined, so indented text doesn't leave gaps in the middle of sentences.
  • Rejoin words split by a hyphen (off by default): joins "exam-" at the end of one line with "ple" at the start of the next to make "example".
  • Blank lines: in Remove all and Replace with mode they're dropped, so you don't end up with double commas or double spaces. In Keep paragraphs mode one or more blank lines become a single paragraph break.

Why the hyphen option is off by default

A hyphen at the end of a line can mean two things. In a justified book or report, "infor-" followed by "mation" is one word that was split to fit the line. But "well-" followed by "known" or "Jean-" followed by "Paul" is a real hyphenated word that just happened to fall at a line end. No simple rule tells these apart every time.

So the tool only joins when a letter comes before the hyphen and the next line starts with a lower-case letter. That spares Jean-Paul, thanks to the capital P, but it would still turn a split "well-known" into "wellknown", which is why you switch this on only for text you know was hyphenated by the layout, and give the result a quick read afterwards.

Where broken lines usually come from

  • PDF files, especially reports and papers set in two columns. Copy one column at a time, or the lines of both columns get mixed up before this tool ever sees them.
  • Plain-text emails and forwarded messages, which often arrive wrapped at a fixed width with a > in front of quoted lines. Remove the > marks first with Find and Replace.
  • Text recognised from a scan (OCR), where every printed line becomes a separate line.
  • Subtitles, poems and song lyrics, where you may actually want the breaks. Here Replace with and a separator like " / " keeps the line structure readable on a single line.

Turning a list into one line

Replace with is the mode people tend to forget about. A column of product codes copied from a spreadsheet becomes A-100, A-101, A-102 with ", " as the separator. Type | to build a regular expression alternative like red|green|blue, or \n to keep one item per line while removing the blank lines between them. Leave the box empty and the lines are glued together with nothing in between.

Related tools

Reviews

What Our Users Say

Real feedback from people using WeblixTools, checked by our team before it appears.

5.0 out of 5 · 1 review

very nice

good ho gye g maza hi a gye
October 2026
See all reviews

Frequently Asked Questions

How do I remove line breaks but keep paragraphs?

Choose Keep paragraphs, which is the default. Lines inside a paragraph are joined with a space, and wherever the original had a blank line you get a paragraph break again.

Why does text copied from a PDF have line breaks everywhere?

A PDF stores where each line sits on the page, not where paragraphs begin and end. Copying gives you those lines one by one, each with a hard break at the end. Pasting the text here and keeping paragraphs puts the sentences back together.

Can I replace line breaks with a comma?

Yes. Pick Replace with and type a comma, or a comma followed by a space. Blank lines are skipped, so a list with gaps in it still comes out as one tidy comma-separated line.

How do I put a tab or a new line in the replacement?

Type \t for a tab and \n for a new line. Any other text is used exactly as you type it.

Does it fix words broken with a hyphen?

Only if you ask it to. Turn on Rejoin words split by a hyphen and a word like "exam-" plus "ple" on the next line becomes "example". It only joins when the next line starts with a lower-case letter, and it can't tell a layout hyphen from a real one like "well-known", so check the result.

Does it work with Windows and Mac line endings?

Yes. \r\n from Windows, \r from old Mac files and \n from Linux and macOS are all treated as line breaks. The result uses \n.

Is my text sent anywhere?

No. Everything happens in your browser. The text isn't uploaded or saved, and it disappears when you close the tab.

See all FAQs →