Skip to content
Devtoolry

Remove Line Breaks

Remove line breaks from text online: join broken lines from a PDF or email into one paragraph, or into a comma-separated list. Optionally keep paragraph breaks.

Runs in your browser · Nothing uploaded · No sign-up

Something not working, or missing a feature? Send feedback

About the Remove Line Breaks

The Remove Line Breaks tool turns text that is broken into many short lines into a single line or paragraph. Use it to clean text copied from a PDF, an email or a terminal, or to turn a column of values into a comma-separated list. It handles Windows (\r\n), Unix (\n) and old Mac (\r) line endings.

Everything runs in your browser, so your input is never uploaded to a server.

How to use the Remove Line Breaks

  1. Paste your text into the input editor.
  2. Choose what replaces each line break: a space, nothing, or a comma.
  3. Turn on "Keep paragraph breaks" if blank lines should still separate paragraphs, then copy or download the result.

Examples

Repair text copied from a PDF

Input

Dear team,
the release is
ready.

Thanks,
Ada

Result

Dear team, the release is ready.

Thanks, Ada

Each paragraph becomes one line, and the blank line between the paragraphs is kept.

Turn a column into a comma-separated list

Input

red
green
blue

Result

red, green, blue

Common mistakes

  • Words glued together. Choosing "Nothing" joins the last word of one line to the first word of the next. Use Space for prose and Nothing only for data such as split tokens.

Works well with the Remove Line Breaks

Frequently asked questions

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

Paste it here with "Replace line breaks with" set to Space and "Keep paragraph breaks" on. The lines are joined into paragraphs and the blank lines between paragraphs are kept.

Does it remove carriage returns too?

Yes. \r\n, \n and \r are all treated as line breaks, so text from Windows, Linux and macOS is cleaned the same way.

Can I turn a list into a comma-separated line?

Choose Comma. Each line becomes one item, separated by ", ", and empty lines are skipped.

Is my text uploaded?

No. The text is processed in your browser and never sent to a server.