How to Remove Line Breaks in Excel (3 Easy Methods)
October 12, 2026
Why Line Breaks Are a Problem in Excel
If you have ever pasted text from a website, a PDF, or an email into Excel, you have probably seen this problem. A single cell ends up holding text that wraps across several lines. These hidden line breaks make your spreadsheet messy, and they can break things you would not expect. Filters and pivot tables treat the same value as different items, formulas like VLOOKUP fail to find matches, and exporting the sheet to CSV can produce broken rows.
Line breaks inside a cell are usually created by pressing Alt+Enter, which inserts a carriage return. Text copied from the web often uses a different kind of line break. Excel handles both, but you need the right method for the right situation. Below are three easy methods that work in every modern version of Excel, from Excel 2016 to Microsoft 365.
Method 1: Find and Replace (Fastest)
The fastest way to remove line breaks in Excel is the built-in Find and Replace dialog. This method works on any selected range, and it deletes the breaks in seconds. No formulas, no extra columns.
Steps:
- Select the cells that contain the line breaks, or press Ctrl+A to select the whole sheet.
- Press Ctrl+H to open the Find and Replace dialog.
- Click inside the "Find what" box and press Ctrl+J. Nothing will appear in the box, but a line break character is now sitting there. This is the most common mistake people make. You must press Ctrl+J even though it looks empty.
- Click inside the "Replace with" box and type what should replace the breaks. Type a single space to keep the words separated, or leave it empty to join the text directly.
- Click "Replace All". Excel will tell you how many replacements it made.
Tip: If Ctrl+J does not find anything, your data may contain line breaks that were typed as actual text. Try copying one of the problem characters directly from a cell and pasting it into the "Find what" box instead.
Method 2: CLEAN and TRIM Functions (Formula-Based)
If you want a formula that keeps working when new data is added, the CLEAN function is the answer. CLEAN removes all non-printable characters from text, including both kinds of line breaks. The only catch is that it does not remove extra spaces, so the best practice is to combine it with TRIM.
Steps:
- In an empty column next to your data, enter this formula. Change A1 to the cell you want to clean:
=TRIM(CLEAN(A1))
- Press Enter. The cell will show the same text with every line break removed and extra spaces collapsed.
- Copy the formula down the column by dragging the fill handle, the small square in the bottom-right corner of the cell.
- Select the cleaned cells, copy them with Ctrl+C, then right-click on the original column and choose Paste Special, Values. This replaces the formulas with the clean text so you can delete the helper column.
Tip: If your data also has double spaces or spaces at the start and end of the text, the TRIM wrapper handles those automatically, so you do not need a separate step for them.
Method 3: Power Query (Best for Large or Repeating Jobs)
If you clean the same kind of data every week, Power Query is worth the small learning curve. It records your cleaning steps and replays them on fresh data with one click. It also handles line breaks that Find and Replace sometimes misses.
Steps:
- Select your data range and go to Data, From Table/Range. Confirm the range and click OK. This loads your data into the Power Query editor.
- In the Power Query editor, select the column with the line breaks.
- Go to the Transform tab, click Format, and choose Clean. Every line break in the column is removed instantly.
- If you also want to trim leading and trailing spaces, click Format again and choose Trim.
- Go to the Home tab and click Close and Load. Excel creates a new sheet with your cleaned table.
Tip: Next time you get a fresh file with the same problem, just right-click the new table and choose Refresh. Power Query repeats the Clean and Trim steps automatically, with no new setup.
Which Method Should You Use?
Here is a quick way to decide. Use Find and Replace when you need a one-time fix and want it done in under a minute. Use CLEAN with TRIM when you want a formula that stays live, or when the cleaned text feeds other calculations. Use Power Query when you repeat the same cleanup regularly or when you are working with thousands of rows.
One thing to remember with all three methods: they change your data, so work on a copy of the sheet or save a backup first. That way you can always go back if the result is not what you expected.
Faster Alternative: Do It Online
If you do not want to open Excel at all, or your text lives outside a spreadsheet, there is an even faster option. Our free online Remove Line Breaks tool works right in your browser. Paste your text, choose a separator like a space or a comma, and the line breaks are replaced instantly. There is no signup, no download, and nothing is sent to a server.
The online tool is especially handy when you are cleaning text for a document, an email, or a web form rather than a spreadsheet. For heavy Excel work the methods above are still the right choice, but for quick text cleanup the free tool saves you the round trip through Excel entirely.