clears.in Menu

Remove line breaks

Paste text: lines join up, and paragraphs stay apart.

Removed 3 line breaks; mended 1 split word.

Keep
Join lines with

What does it do to a real text?

A notice copied out of a PDF:

Before

Please bring your Aadhaar⏎
card and two photos.⏎
⏎
The counter opens at⏎
10 am on week-⏎
days.

After

Please bring your Aadhaar card and two photos.⏎
⏎
The counter opens at 10 am on weekdays.

Removed 3 line breaks; mended 1 split word.

⏎ marks a line break, and a short name in a box a hidden character.

More examples

With Keep paragraphs off, it all goes on one line:

Before

Please bring your Aadhaar⏎
card and two photos.⏎
⏎
The counter opens at⏎
10 am on week-⏎
days.

Keep paragraphs off

Please bring your Aadhaar card and two photos. The counter opens at 10 am on weekdays.

Joined with a comma, a list becomes one line for a form:

Before

Pune⏎
Nagpur⏎
Nashik

Joined with a comma

Pune, Nagpur, Nashik

What rules does it follow?

  1. A line break is a line feed, a carriage return, or the pair Windows writes; the pair counts once.
The other 6 rules
  1. An empty line, or a line of only spaces, ends a paragraph. With Keep paragraphs on, paragraphs stay apart with one empty line between them, however many there were.
  2. Inside a paragraph each line joins the one before it with what you choose: a space, nothing, or a comma and a space.
  3. Spaces at the start and end of every line go before the join, so no double space is left behind.
  4. Mend split words: when a line ends in a letter and a hyphen and the next line starts with a small letter, the two close up without the hyphen (week- and days give weekdays). It runs only when lines join with a space.
  5. Keep list lines: a line starting with a bullet, a number with a stop or bracket (1. or 1)) or a letter in brackets ((a)) stays on a line of its own.
  6. With Keep paragraphs off, everything ends up on one line, list lines included.

What do people ask?

How do I remove line breaks from a text file?

Choose Open a .txt file: your browser reads the file into the first box, and the file stays on your device. Save as .txt makes the cleaned copy.

Why did a hyphenated word lose its hyphen?

Mend split words cannot tell a word split at the end of a line from a word with a hyphen of its own: passport- at a line end with size on the next line gives passportsize. Untick Mend split words for such text.

How do I remove line breaks in Excel or Notepad++?

Each has its own way: CLEAN or SUBSTITUTE in Excel, and Extended mode in Notepad++.

And in Word?

Copy the text out of Word, clean it here, and paste the result back.