How to Remove Line Breaks from a List

Text copied from a PDF, an email, or a chat window sometimes carries line breaks in places you don't want them - a paragraph that should read as one continuous line, or a list of words that needs to become a single line of text for a form field that won't accept multiple lines.

Quick answer

Paste your text into Find & Replace, switch to Regex mode, set Find to \n, and set Replace to a single space (or leave it empty to join everything with nothing in between). Click Replace All and every line break is gone, leaving one continuous line.

Remove line breaks now. Free, nothing to install.

Open Find & Replace →

How to remove line breaks in 3 steps

  1. Paste your text into Find & Replace.
  2. Enable Regex mode, set Find to \n, and set Replace to whatever should go in place of each line break - a single space keeps words separated, leaving it empty joins everything with no gap at all.
  3. Click Replace All. The output is now one continuous line.

Example

Text like this:

The quarterly
report is due
Friday

with line breaks replaced by a space becomes:

The quarterly report is due Friday

If you specifically want a comma-separated line instead

Replacing line breaks with a space or nothing works for turning prose or a word list into one line of plain text, but if the goal is specifically a comma-separated string - for pasting into code, a spreadsheet formula, or a CSV field - use Text Fixer's "Joined (CSV)" output format instead, which joins every line with a comma automatically. See the full guide to converting a list into a comma-separated string for that specific case.

Doing more than one find-and-replace at once?

Find & Replace supports up to 8 chained find-and-replace pairs in a single pass.

Read the guide →

Frequently Asked Questions

How do I remove all line breaks from a block of text?
Paste it into Find & Replace, enable Regex mode, set Find to \n and Replace to a space (or leave Replace empty to remove the breaks with no gap at all), then click Replace All.
Why do I need Regex mode for this instead of a normal find and replace?
\n is a regex pattern that matches an actual line break character, not the two literal characters "\" and "n". Regex mode is what tells Find & Replace to interpret it that way rather than searching for that literal text.
What's the difference between replacing line breaks with a space versus removing them entirely?
A space keeps words readable and separated ("word1 word2"), while replacing with nothing joins them directly together ("word1word2"). Use a space unless you specifically want words concatenated with no gap.
Can I turn a list into a comma-separated line instead of just removing the breaks?
Yes, that's a related but different operation. Use Text Fixer's "Joined (CSV)" output format, which joins every line with a comma automatically - see the full guide for that case.
Does this work on text copied from a PDF or Word document?
Yes. Line breaks behave the same regardless of where the text originated - PDF, Word, email, or a chat export all use the same underlying line break characters that \n matches.
Will this affect blank lines too?
Yes, a blank line is just two line breaks in a row, so it gets collapsed along with every other line break in the text.
Can I remove line breaks and also clean up other formatting in the same pass?
Yes. Find & Replace supports up to 8 chained find-and-replace pairs, so you can remove line breaks and fix other issues - extra spaces, stray characters - in the same single pass.

Share this tool

Featured on ToolDirs
© 2026 ListDiff

Free online list and text processing tools.