Utilia

Remove Line Breaks and Extra Spaces

Remove line breaks and extra spaces from text copied from a PDF or an email. Keep paragraphs and lists, rejoin hyphenated words, strip quote marks.

How to remove line breaks

  1. Paste your text into the input box: a passage copied from a PDF, an email, a web page or a subtitle file.
  2. Under Line breaks, choose Keep paragraphs to join the broken lines while keeping the blank lines between paragraphs, or Remove all line breaks to get everything on one single line.
  3. Adjust the cleaning options if needed (they are explained below).
  4. The cleaned text appears in the result box. Clean text refreshes it after you edit.
  5. Copy the result and paste it into your document, email or form.

Under the result, the tool shows how many line breaks were removed and the number of characters before and after cleaning.

Why text copied from a PDF is full of line breaks

A PDF doesn’t store paragraphs. It stores lines of text placed at precise positions on the page. When you copy a passage, every visual line ends with a hard line break, so a paragraph pasted into Word or an email turns into a column of short lines. Emails do the same thing: many email programs wrap plain-text messages at about 72 characters and add a > before every quoted line when you reply.

This tool rebuilds the paragraphs. Inside a paragraph, each line break is replaced by a space. A blank line is considered the end of a paragraph, and in Keep paragraphs mode the result keeps exactly one blank line between paragraphs.

The cleaning options

  • Rejoin words hyphenated at the end of a line: a PDF often splits long words across two lines, as in “infor-” followed by “mation”. The tool removes the hyphen and glues the two halves back together when the next line starts with a lowercase letter. A real compound word split at its hyphen (“well-” then “known”) will lose its hyphen too, so reread the result if your text contains many of them.
  • Keep list items on their own line: lines that start with a bullet (-, , •), a number (“1.” or “2)”) or a letter (“a)”) stay on separate lines, so bullet lists survive the cleaning. This works in Keep paragraphs* mode.
  • Replace multiple spaces and tabs with one space: removes the double spaces and tabs that appear when text is copied from columns, tables or justified layouts.
  • Trim spaces at the start and end of lines: removes indentation and trailing spaces before the lines are joined.
  • Remove email quote marks (>): strips the > or > > prefixes that mark quoted replies, so you can reuse the original message.

Non-breaking spaces are left untouched, so French typography such as the space before a colon is preserved.

Tips

  • If your text has no blank lines between paragraphs, the whole text will become one paragraph. Add a blank line where each paragraph should end, then clean again.
  • To put a whole list on a single line, separated by spaces, choose Remove all line breaks.
  • For code, poems or addresses, where line breaks carry meaning, don’t use this tool on the whole text; clean only the paragraphs that need it.

Frequently asked questions

How do I remove line breaks but keep paragraphs?

Choose Keep paragraphs (remove single line breaks). Single line breaks inside a paragraph become spaces, and the blank lines that separate paragraphs are kept.

Why are some hyphens removed?

With Rejoin words hyphenated at the end of a line on, a hyphen at the very end of a line followed by a lowercase word is treated as a word split by the PDF. Turn the option off if your text contains compound words that happen to break at their hyphen.

Can I remove every line break, including between paragraphs?

Yes. Select Remove all line breaks (one single line). Every line break and blank line is replaced by a single space.

Does it remove double spaces?

Yes, when Replace multiple spaces and tabs with one space is ticked. Runs of spaces and tabs are reduced to one normal space.

Is my text sent anywhere?

No. The cleaning runs in your browser, so confidential emails and documents never leave your device.