Yueser

Remove line breaks

Text copied from PDFs and web pages often carries a pile of hard line breaks — clear them all at once here.


  
Note

"Merge into one paragraph" replaces every line break with a space, which suits prose. If your text contains lists or code, switch to "Remove blank lines only".

When to use it

  • Text copied from a PDF arrives with a hard break at the end of every line, and you want it as one flowing paragraph (no-space merge for Chinese, space merge for English).
  • Text copied from a web page carries runs of spaces, trailing blanks and full-width spaces that make the layout look loose, and you want single spaces.

When not to

  • The text contains lists, tables or code: merging flattens indentation and list structure, so use ‘remove blank lines only’ instead.
  • You still need to process it line by line (sort, dedupe, find and replace): once line breaks are gone you cannot get them back, so do the other steps first.
Limits and privacy

Processing is local and nothing is uploaded. Limits: it only touches whitespace and line breaks — lists, tables and code blocks are not recognised, and merging flattens paragraph structure for good; keep a copy of the original because the result cannot be undone; on text of tens of MB the string replacement holds two copies in memory and can stutter.

Frequently asked

Merging removes the blank lines between paragraphs — can I keep paragraph breaks?

No. The merge mode trims every line, drops all empty lines and joins what is left with a single space, so paragraph information is gone at that step. Use ‘remove blank lines only’ instead: it collapses runs of blank lines into one newline, joins nothing, and paragraphs survive.

Why does ‘trim only’ delete my code indentation?

That mode trims every line, including its leading whitespace, so it is destructive for code and indented lists. ‘Collapse extra spaces’ leaves indentation in place (runs of spaces collapse to one) and only cleans trailing whitespace and repeated spaces, including the full-width space, which is the safer choice.

Why do Chinese sentences get spaces between them after merging?

The space-merge joins trimmed lines with a single space, which also lands between Chinese characters. The no-space merge concatenates them directly, which is what Chinese wants; English is the opposite — merge without spaces and words stick together.