Skip to content
StringNook
Menu

Remove line breaks

Fix text copied from a PDF or an email, where every line ends early: join the broken lines into proper paragraphs, keep the real paragraph breaks, or put everything on one line.

Off: your text is gone when you close the page. It is never sent anywhere.

What to do

Lines inside a paragraph are joined with a space; blank lines between paragraphs stay.

“exam-” + “ple” becomes “example”; real hyphens such as “Jean-Paul” and “self-esteem” stay.

Starts a new paragraph after a short line ending in a full stop, and keeps bullets and numbered items on their own lines.

The fixed text appears here.

  • Your text stays on your device
  • Free, no sign-up
  • Works on phone and desktop

How to remove line breaks

  1. 1

    Paste the text with unwanted line breaks, for example copied from a PDF, an email or a narrow web column.

  2. 2

    Choose Keep paragraphs to join the broken lines but keep the gaps between paragraphs, or One line to join everything.

  3. 3

    Leave Rejoin words split with a hyphen on so “exam-” and “ple” become “example”, while real hyphens stay.

  4. 4

    Copy the fixed text. To turn a column into a list instead, choose Replace breaks and pick a comma, a space or <br>.

Features

  • Keeps your paragraphs

    Blank lines between paragraphs survive, so the text reads as it was written, not as one wall of words.

  • Careful with hyphens

    Split words are rejoined, but names like Jean-Paul, numbers like COVID-19 and compounds like self-esteem keep their hyphen.

  • Lists and HTML too

    Replace each line break with a comma, a semicolon, a space, <br> or your own separator.

  • Private

    Contracts, reports and emails are fixed in your browser. Nothing is uploaded or stored.

Fixing text copied from a PDF or an email

Copying from a PDF is the most common cause of broken lines: the PDF knows where each line sits on the page but not which lines make up a paragraph. Plain-text emails do something similar, because the email standard (RFC 5322) recommends lines of no more than 78 characters, so many mail programs wrap long paragraphs with hard line breaks, and replies quote them line by line. Here is a short email as it often arrives, and the same text with Keep paragraphs:

PastedFixed
Hi Sam,

The files are in the shared folder. Please
review them before Friday and send any
comments to the team.

Thanks, Alex
Hi Sam,

The files are in the shared folder. Please review them before Friday and send any comments to the team.

Thanks, Alex

The greeting, the paragraph and the sign-off stay apart because blank lines separate them; only the lines inside the paragraph are joined. A sign-off written as “Thanks,” on one line and the name on the next, with no blank line between, is joined like any other wrapped line, so check short lines like these after fixing. For text with no blank lines at all, turn on Find paragraphs without blank lines: a short line that ends a sentence then closes its paragraph.

How hyphens at line ends are handled

Books, reports and PDFs often split long words with a hyphen at the end of a line. Removing every such hyphen would break real compounds, and keeping them all leaves “exam- ple” scattered through the text. The tool uses the letters on both sides of the break and the rest of your text to decide:

PastedResultWhy
an exam-
ple
an exampleA word split at the end of a line: the hyphen goes.
Jean-
Paul
Jean-PaulThe next line starts with a capital, so the hyphen is real.
COVID-
19
COVID-19Followed by a number: the hyphen stays.
low self-
esteem
low self-esteem“Self-” compounds keep their hyphen.
a mother-in-
law
a mother-in-lawAlready hyphenated before the break: kept.
it was self-
ish
it was selfishA word ending such as -ish means a split word.
one -
two
one - twoA spaced dash is punctuation: joined with a space.

If the same hyphenated word appears whole elsewhere in your text, for example “follow-up” in an earlier sentence, a “follow-” at a line end keeps its hyphen too. Soft hyphens (the invisible hyphens some word processors insert) are always removed.

Turning a column into a list

Choose Replace breaks to swap each line break for a separator instead of a space. It turns a column copied from a spreadsheet into a line you can paste into a form, a search box or code. Starting from three lines, red, green and blue:

Replace withResult
Commared, green, blue
Semicolonred; green; blue
<br>, keeping each linered<br>
green<br>
blue

To clean the list first, remove repeats with remove duplicate lines or sort it with alphabetical order. After fixing a long text, the word counter gives an accurate count now that every line is whole, and text compare in word mode shows that no words were lost along the way.

Frequently asked questions

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

A PDF records where each line of text is drawn on the page, not where paragraphs begin and end. When you copy, most readers put a line break at the end of every line they find, so a paragraph arrives as a stack of short lines. Joining the lines within each paragraph restores normal text that rewraps to fit wherever you paste it.

How do I keep paragraphs but remove the other line breaks?

Choose "Keep paragraphs" (the default). Lines are joined with a space, and a blank line still separates one paragraph from the next. If your text has no blank lines between paragraphs, turn on "Find paragraphs without blank lines": a short line ending in a full stop, question mark or colon then ends a paragraph, and bullets or numbered items stay on their own lines.

Will it remove hyphens from words like "well-known"?

It tries hard not to. A hyphen at the end of a line is kept when the next line starts with a capital or a number, when the word was already hyphenated before the break, for common compounds such as self-, well-, long-term or evidence-based, and whenever the same hyphenated word appears elsewhere in your text. Otherwise the two halves are joined. Check the result for unusual compounds, or turn the option off to keep every hyphen.

How do I put a list on one line separated by commas?

Choose "Replace breaks" and pick Comma. Each line break becomes a comma and a space, and blank lines are left out, so a column copied from a spreadsheet becomes "red, green, blue". Choose Other to type your own separator, such as " | " or a tab (type \t).

How do I add <br> tags to the end of each line?

Choose "Replace breaks", pick <br> and turn on "Keep each line on its own line". Every line except the last then ends with <br>, which keeps the line breaks when the text is pasted into HTML. The result is shown as plain text for you to copy, never run as code on this page.

Does it change anything else in my text?

Only spacing: runs of spaces and tabs become a single space, which you can turn off with "Collapse extra spaces". Words, punctuation and capital letters are left exactly as they were.

More free tools