Text tools

Line break remover: remove line breaks from text

This line break remover joins the lines of a text in your browser. Paste text or open a UTF-8 file, then keep paragraphs and join the lines inside them, join every line with a space, or remove every break. It can also replace each break with a separator such as a comma, or add breaks at one.

Source text

Choose a file or paste your text.

Changes to apply

Paragraph mode joins single breaks with one space and preserves blank-line boundaries. All other join modes also replace paragraph breaks.

Optional trimming runs before the operation. Interior spaces, nonbreaking spaces and other Unicode stay unchanged unless matched by your separator.

Applied last. The default does not restore a final break removed by joining. Add also works on empty input; remove leaves trailing spaces alone.

Choose your options, then apply changes.

Result

Breaks before
Breaks after

No result yet.

CRLF, CR and LF are recognized; CRLF counts once. Retained and added breaks use LF. Downloads preserve exact UTF-8 output, including an existing leading BOM. Clipboard applications may normalize endings.

Joining inserts one space per break in space mode, or nothing in remove mode. Existing spaces remain unless trimmed. No words are guessed, reflowed or dehyphenated.

How to remove line breaks

To remove line breaks, put your text in Input text, pick an Operation and select Apply changes. The result appears under Transformed text, with a count of breaks before and after.

  1. Type or paste into Input text. You can also select Open UTF-8 file, or Example for a short sample with mixed line endings.
  2. Under Operation, choose Join within paragraphs, Join all with spaces, Remove all breaks, Replace breaks with a separator or Add breaks at a separator.
  3. For the two separator operations, type the text under Separator (literal text). It starts as a comma and a space.
  4. Optionally check Trim spaces and tabs at line edges, and pick a Final newline rule.
  5. Select Apply changes, then Copy text or Download UTF-8.

Changing any setting or the input clears the old result, so apply again to see the new one. Reset clears the text and sets every option back to its default.

What each operation does

Join within paragraphs is the default. It turns each single break into one space and keeps blank lines, so a pasted email stays in paragraphs. Three short lines plus a blank line and two more lines become two paragraphs of one line each: "Dear team, the meeting moved to Friday." and "Thanks, Ana".

Join all with spaces turns every break into one space, including both breaks of a blank line, so two paragraphs end up separated by two spaces. Remove all breaks deletes each break and inserts nothing, which joins a word split across lines, such as infor and mation, into information, but also runs separate words together.

Replace breaks with a separator puts your separator where each break was, so apple, banana and cherry on three lines become apple, banana, cherry. An empty separator removes the breaks. Add breaks at a separator does the reverse: each exact, case-sensitive match becomes a line break and the separator itself is removed.

Spaces, line endings and the final newline

The tool counts Windows CRLF, old Mac CR and Unix LF breaks, and a CRLF pair counts as one break. Breaks it keeps or adds are written as LF. It does not collapse repeated spaces, so a line that ends in a space and is joined with a space leaves two spaces in the result.

Trim spaces and tabs at line edges removes those characters at the start and end of every line before the operation runs. Other whitespace, such as a nonbreaking space, stays as it is. When a text ends with one break, the two space-joining operations turn it into a trailing space, and Remove all breaks deletes it.

The Final newline rule runs last. Leave transformed result keeps the output as the operation produced it. Add LF if missing ends the text with one LF, and Remove trailing LF breaks deletes every LF at the very end. A leading byte order mark in an opened file stays at the start of the downloaded file.

Limits

This is a plain-text tool. An opened file must be valid UTF-8, with or without a byte order mark, and invalid encoding gives an error instead of replacement characters. It does not read PDF or Word files, so copy their text and paste it into Input text instead.

The separator is literal text on one line. There is no regex and no escape code, so typing \n matches a backslash and the letter n, not a newline. That also means Add breaks at a separator with \n turns a literal \n in pasted code or JSON into real line breaks.

The tool does not guess where words or sentences end. It does not fix hyphenated words, rewrap text to a set width or treat the Unicode line separator characters U+2028 and U+2029 as breaks. There is no set text-size limit; your browser's memory is the limit, and Cancel stops a run while keeping your input.

Questions

How do I remove line breaks from text?

Paste the text into Input text, set Operation to Join all with spaces and select Apply changes. Every break becomes one space, so the text reads as a single line. Choose Remove all breaks instead when the breaks split words that should join with no space, then select Copy text or Download UTF-8.

How do I remove line breaks but keep paragraphs?

Use Join within paragraphs, the default Operation. A single line break becomes one space, and a run of two or more breaks with only spaces or tabs between them is kept as a paragraph break. The tool finds paragraphs only from blank lines, never from punctuation, so a paragraph with no blank line after it joins the next one.

Is there a way to paste without line breaks?

Yes. Paste the text into Input text, choose Join all with spaces and apply the change, then select Copy text and paste the result where you need it. The copied text has no line breaks left. If the browser blocks clipboard access, the tool selects the result so you can copy it by hand.

How do I replace a new line with a comma?

Choose Replace breaks with a separator. The Separator field already holds a comma and a space, so a list of names on separate lines becomes one line with the names separated by commas. Clear the space for a plain comma, or type any other text, such as a semicolon or a pipe character.

How do I remove line breaks from PDF text?

This tool does not open PDF files, but it cleans the text you copy out of one. Copy the text from your PDF reader, paste it into Input text and use Join within paragraphs, which keeps blank-line paragraphs and joins the broken lines inside them. Hyphens at line ends stay, since the tool does not dehyphenate.

Is my text uploaded?

No. The text and any file you open are read and changed by a Web Worker in your browser. They are not sent to a server or saved in browser storage. Copy and download run only when you select them, and leaving the page clears the text, the file and the result from it.