Skip to main content
Premier SEO Services

Text tools

Remove Line Breaks

Remove the hard line breaks that text copied from PDFs and emails picks up, keep paragraph breaks if you want them, or add breaks after a set number of characters or words.

  • Runs in your browser
  • Free, no sign-up
  • Unlimited use
  • Updated 30 September 2026

Remove Line Breaks

Paste your text — the result updates as you type

How to use the remove line breaks

  1. 1Paste the text into Text with line breaks.
  2. 2Choose an action under What to do. Remove line breaks, keep paragraphs is the usual fix for text copied from a PDF.
  3. 3Choose what replaces each break under Replace line breaks with: a space, nothing, a comma or your own text.
  4. 4Press Copy, or Reuse to run another step on the result.

Example

Input
Text copied from a PDF often breaks in the
middle of a sentence, because each line of the
page ends with a hard line break.

A blank line between blocks marks a new
paragraph, and this tool can keep it.
Output
Text copied from a PDF often breaks in the middle of a sentence, because each line of the page ends with a hard line break.

A blank line between blocks marks a new paragraph, and this tool can keep it.

Default settings. The three breaks inside the paragraphs become spaces; the blank line between the paragraphs stays.

Removing all line breaks

Remove all line breaks turns the whole text into a single line. Blank lines are treated like any other break. When the replacement is a space or a comma, spaces at the start and end of each line are trimmed first, so you don't get doubled spaces where lines meet, and Collapse repeated spaces tidies any that remain.

Use it for fields that must be one line: a meta description, a spreadsheet cell, a JSON string or a form that rejects line breaks.

Keeping paragraph breaks

A paragraph break is a blank line: two line breaks in a row, even if the empty line contains a few spaces. Remove line breaks, keep paragraphs joins the lines inside each paragraph and leaves exactly one blank line between paragraphs.

If the source has no blank lines between paragraphs, there is nothing to tell where one paragraph ends and the next begins. In that case join everything, then use Add a break after punctuation or add the breaks back by hand.

Replacing breaks with spaces, commas or custom text

  • A space (default) for normal prose.
  • Nothing for things that were split mid-word, such as long codes, keys or Base64 strings wrapped at a fixed width.
  • Comma and space to turn a column copied from a spreadsheet into a list: apple, banana, cherry on three lines become apple, banana, cherry.
  • Custom text… for anything else, such as | or ;. Type \n or \t for a line break or a tab.

Adding line breaks

Add a break every N characters wraps lines at N characters. With Don't split words ticked, a word that would cross the limit moves to the next line, so lines can be shorter than N but never longer, unless a single word is longer than N. Plain-text email is traditionally wrapped at 72–78 characters.

Add a break every N words starts a new line after every N words: with N = 4, one two three four five six seven eight nine becomes three lines, one two three four, five six seven eight and nine.

Add a break after punctuation starts a new line after each ., ! or ? (edit the list under Break after these characters). Closing quotes and brackets stay with their sentence. Abbreviations such as “e.g.” also get a break, so check the result.

Why PDF text has broken lines

A PDF stores text as lines placed at fixed positions on a page, not as flowing paragraphs. When you copy from it, most viewers put a line break at the end of every visual line, so sentences arrive cut into pieces. Words hyphenated at the end of a line arrive as exam-, a break, then ple.

Tick Rejoin words split by a hyphen at line ends to put them back together. It only joins when the next line starts with a lowercase letter, but it can't tell a real compound word that happened to fall at a line end (well- / known) from a split word, so leave it off for text with many hyphenated compounds.

Is my text private?

This tool runs entirely in your browser. Your text is not uploaded to our servers.

Questions about the remove line breaks

How do I remove line breaks but keep paragraphs?

Choose Remove line breaks, keep paragraphs, which is the default. It needs a blank line between paragraphs in your text; single line breaks are joined with a space.

How do I replace line breaks with commas?

Choose Remove all line breaks, then Comma and space under Replace line breaks with. For a comma without a space, choose Custom text… and type a comma.

Why does text from PDFs break in the middle of sentences?

The PDF keeps each line of the page as a separate piece of text, and copying inserts a line break where each line ended on the page, not where the sentence ends.

Does it handle Windows line endings?

Yes. Windows (CRLF) and old Mac (CR) line endings are converted to standard line breaks before processing, and the result uses plain line feeds.

Last updated 30 September 2026Maintained by Premier SEO Services

Report a problem