Remove Line Breaks

Paste text with hard line breaks, for example from a PDF, and every line is joined into flowing text: "the lazy⏎dog" becomes "the lazy dog". Choose whether lines are joined with a space or with nothing, and whether paragraphs stay apart.

Characters
0
Words
0
Lines
0

Your text never leaves your device.

How to use

  1. Paste the text with unwanted line breaks into the box.
  2. Choose Replace with space for normal text, or Remove completely for wrapped links and codes. Turn on Keep paragraph breaks to keep empty lines between paragraphs.
  3. Copy the joined text or download it as a .txt file.

Examples

  • Before
    The quick brown fox jumps over the lazy dog. It was not amused.
    After
    The quick brown fox jumps over the lazy dog. It was not amused.
  • Before
    First paragraph line one line two. Second paragraph continues here.
    After
    First paragraph line one line two. Second paragraph continues here.
  • Before
    https://example.com/very/long/ path/to/file.pdf
    After
    https://example.com/very/long/path/to/file.pdf

What the tool does with each line

Lines are joined in order. With Replace with space, the spaces at the end of a line and the indentation at the start of the next are dropped before joining, so you never get double spaces in the middle of a sentence. With Remove completely, lines are glued together exactly as they are.

Empty lines, including lines that contain only spaces, are removed. With Keep paragraph breaks turned on, they mark paragraph boundaries instead: each paragraph becomes one line, and a single empty line separates paragraphs, however many there were in the original.

Where hard line breaks come from

  • PDFs: copied text keeps the line breaks of the printed layout, and columns can add more.
  • Emails: plain-text messages are often wrapped at 72–76 characters, and replies add more breaks with every quote level.
  • Terminals and logs: long lines are wrapped to the window width.
  • OCR: scanned documents come out line by line.

Pasting such text into a word processor or a CMS leaves short ragged lines that cannot reflow. Removing the breaks first gives text that wraps naturally at any width.

Common mistakes

  • Removing paragraph breaks you wanted to keep. Without Keep paragraph breaks, a three-paragraph text becomes one block. Turn the option on before copying.
  • Joining code or poetry. Line breaks carry meaning in code, addresses, verse and lists. Only remove them from running prose.
  • Using Remove completely for prose. “lazy⏎dog” becomes “lazydog”. Use it only for links, codes and languages written without spaces.
  • Expecting bullet lists to survive. A list pasted from a PDF turns into one line. Remove the breaks only in the paragraphs, or use remove empty lines if all you want is to drop blank lines.

Frequently asked questions

How do I remove line breaks from text copied from a PDF?

Paste the text here with Replace with space selected. Every line break becomes a single space, so the sentences flow again. If the text has several paragraphs, turn on Keep paragraph breaks first: the lines inside each paragraph are joined and the empty lines between paragraphs stay.

Why does PDF text have a line break at the end of every line?

A PDF stores text as positioned lines on a page, not as paragraphs. When you copy it, most viewers insert a line break wherever the line ended visually. Plain-text emails wrapped at 72 or 76 characters and terminal output have the same problem.

When should I replace line breaks with nothing?

Use Remove completely when the line break split something that must not contain a space: a long URL, a Base64 string, a card or tracking number, or Chinese and Japanese text, which has no spaces between words.

What happens to hyphenated words split across lines?

The hyphen stays, so "hyphen-⏎ated" becomes "hyphen- ated". To join such words, first run find and replace in regex mode with the pattern -\n and an empty replacement, then remove the remaining line breaks here.

Does it handle Windows and Mac line breaks?

Yes. Windows (CRLF), Unix and macOS (LF) and old Mac (CR) line endings are all removed. With Keep paragraph breaks on, paragraphs are separated by exactly one empty line in the line ending your text already used.