How to Remove Line Breaks in Notepad++ (4 Fast Methods)

• Guides • ~4 min read
Before and after comparison showing broken CRLF lines in Notepad++ joined into a clean paragraph

If you pasted text from a PDF, log file, SQL query, or web page into Notepad++ and every sentence is broken onto its own line, you can fix the entire file in seconds.

In this guide, you will learn the 4 fastest ways to remove line breaks in Notepad++ — from a single keyboard shortcut (Ctrl+J) to regex Find & Replace and a zero-setup browser alternative.

What you will learn

Fastest shortcut (Ctrl+J) · Extended Mode Find & Replace (\r\n) · Cross-platform Regex ([\r\n]+) · Removing only blank lines · 1-click browser cleaner

Don't have Notepad++ open? Paste your text into our free Online Line Break Remover to strip line breaks and extra spaces in one click — 100% private in your browser.

Which Notepad++ Method Should You Use?

Decision diagram comparing Notepad++ Join Lines Ctrl+J, Extended Mode Find and Replace, Regex, and Remove Empty Lines
Choose the right Notepad++ method based on your text cleanup goal

Method 1: Join Lines Shortcut (Ctrl + J) — Fastest

If you just want to merge selected lines into a single clean paragraph separated by spaces, Notepad++ has a built-in command:

  1. Select the lines you want to merge (or press Ctrl + A to select the whole file).
  2. Press Ctrl + J (or go to Edit → Line Operations → Join Lines).

Notepad++ immediately removes the line breaks and joins every line with a single space.

Method 2: Find & Replace in Extended Mode (\r\n)

Screenshot diagram of Notepad++ Replace dialog showing Find what \r\n and Extended Search Mode selected
Notepad++ Replace (Ctrl+H) with Extended Search Mode enabled

When you want to replace line breaks with a comma, a custom delimiter, or nothing at all (e.g., joining wrapped SQL strings or base64 text):

  1. Press Ctrl + H to open the Replace dialog.
  2. Under Search Mode (bottom-left), select Extended (\n, \r, \t, \0, \x...).
  3. In Find what, type \r\n (for Windows CRLF files) or \n (for Unix/Linux LF files).
  4. In Replace with, type a single space , a comma , , or leave it blank.
  5. Click Replace All.

Tip: Not sure whether your file uses \r\n or \n? Click the ¶ (Show All Characters) icon in the Notepad++ toolbar to see whether lines end with CR LF or just LF.

Method 3: Remove Line Breaks with Regex (Cross-Platform)

If your text mixes Windows (\r\n), Mac (\r), and Linux (\n) line endings, Regular Expression mode handles all of them in one pass:

  1. Press Ctrl + H.
  2. Select Regular expression under Search Mode.
  3. In Find what, enter: [\r\n]+
  4. In Replace with, enter a single space (or leave empty).
  5. Click Replace All.

Method 4: Remove Only Empty / Blank Lines

If you want to keep your paragraphs intact and only delete blank lines between them, do not use Find & Replace. Instead:

  1. Go to Edit → Line Operations → Remove Empty Lines.
  2. If some blank lines contain hidden spaces or tabs, choose Edit → Line Operations → Remove Empty Lines (Containing Blank characters).

Bonus: Quick Browser Alternative (No Install Needed)

If you are on a locked work computer, mobile device, or just want to clean up text copied from ChatGPT, PDFs, or Google Docs without opening a desktop editor:

Frequently Asked Questions

Q1: What is the fastest shortcut to remove line breaks in Notepad++?

A: Select your text and press Ctrl + J (Edit → Line Operations → Join Lines). It merges all selected lines into one line with single spaces.

Q2: How do I remove all line breaks using Find and Replace in Notepad++?

A: Press Ctrl + H, choose Extended Search Mode, put \r\n in Find what, put your replacement (like a space or comma) in Replace with, and click Replace All.

Q3: Why didn't \n work in Notepad++ Find and Replace?

A: Windows files use \r\n (CRLF) rather than \n alone, and Search Mode must be set to Extended or Regular expression (not Normal).

Q4: How do I remove only empty or blank lines in Notepad++?

A: Click Edit → Line Operations → Remove Empty Lines (or Remove Empty Lines (Containing Blank characters)) to delete blank lines without merging paragraphs.

Notepad++ Join Lines Remove CRLF Find and Replace Line Break Remover Text Editing