Remove Line Breaks and Extra Spaces

Text copied from a PDF, an email or a terminal often arrives chopped into short lines. Paste it here to join the lines back into flowing sentences, keep paragraph breaks if you want them, and clean up doubled spaces and tabs.

Your text is cleaned up in your browser and never uploaded.

How to remove line breaks

  1. Paste your text into the input box.
  2. Choose what to do with line breaks:
    • Keep paragraphs — joins the lines inside each paragraph, but leaves blank lines between paragraphs. This is the right choice for most text copied from PDFs.
    • Replace with a space — turns everything into one long paragraph.
    • No space — joins lines directly, useful for long URLs, Base64 strings or codes that were wrapped across lines.
    • Keep line breaks — leaves lines alone and only tidies spaces.
  3. Copy the result or download it as a text file.

Why copied text has broken lines

PDF files don't store paragraphs — they store lines of text placed at exact positions on a page. When you copy from a PDF, most readers give you those lines with a hard line break at the end of each one. Pasted into an email, a document or a form, the text then breaks in odd places. Plain-text emails do something similar: many email programs wrap lines at about 72 characters when sending.

The tool treats a blank line (or a line containing only spaces) as a paragraph break and every other line break as a soft wrap, which matches how almost all PDFs and emails are laid out.

Cleaning up spaces

Hyphenated words split across lines (“informa-tion”) are kept as written, because the tool can't tell a line-break hyphen from a real one such as “well-known”. Use find and replace to fix any that remain.

Frequently asked questions

How do I remove line breaks but keep paragraphs?

Choose “Remove, but keep paragraphs”. Lines inside a paragraph are joined with spaces, and blank lines between paragraphs are preserved.

Why are there no spaces between words after joining?

You probably chose “no space”. Switch to “replace with a space”, which inserts a space where each line break was.

Is my text sent anywhere?

No. The cleanup runs in your browser; the text is never uploaded or stored.

Does it work with Windows line endings?

Yes. Windows (CRLF), Unix/macOS (LF) and old Mac (CR) line endings are all recognized.