Excel stores line breaks inside cells as one of five recognized token types: CRLF (CHAR 13 + CHAR 10), standalone CR (CHAR 13), standalone LF (CHAR 10), U+2028 LINE SEPARATOR, and U+2029 PARAGRAPH SEPARATOR. Removing them requires either a built-in formula approach, the Find & Replace dialog with the Ctrl+J trick, or a local browser tool that catches every form in one pass. Each approach leaves a different footprint on the rest of your text. Excel's native methods only normalize the two line breaks Excel itself produces, which means characters copied from web pages, PDFs, or older Mac files can survive every formula you throw at them. A dedicated line-break tool recognizes all five token forms, treats CRLF as one combined token rather than two, and reports exactly how many were detected, removed, and still remaining so you can verify the cleanup against your source.

For most Excel users, the first instinct is to widen the column or turn on Wrap Text. That fixes the visible symptom but does nothing about the underlying characters, which still break formulas like SEARCH, FIND, LEN, and TEXTJOIN. The next sections walk through why line breaks appear in cell data in the first place, how Excel itself can remove them, and how to finish the job in a browser when Excel's own tools stop short.

how to remove line breaks in excel
how to remove line breaks in excel

How line breaks actually appear in Excel cells

Excel inserts an LF character (CHAR 10) when you press Alt+Enter inside a cell. That single character is what Wrap Text relies on, and it is the only line break Excel produces through normal keyboard entry. The remaining token types arrive from outside:

  • CRLF appears when cells are pasted from Windows clipboard content originating in HTML, CSV exports, or systems that always terminate records with both characters.
  • Standalone CR shows up in text exported from older Mac versions (pre-OS X), from mainframe reports, or from certain data feeds.
  • U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR enter through text copied from word processors, JSON exports, or JavaScript-generated content where the rendering engine used these separators instead of CRLF.

The reason this matters: when you later split a column by line break, count characters, or feed the cell into TEXTJOIN, the separator choice changes the result. A TEXTJOIN with CHAR(10) skips U+2028 entirely, leaving an awkward comma joined across what looked like two lines. Recognizing every form is the only way to make cleanup predictable.

Excel's built-in ways to remove line breaks

Excel gives you three reliable built-in paths. Each handles a different subset of the five token types, which is the source of most "it did not work" complaints.

Find & Replace with Ctrl+J

  1. Select the cells you want to clean. Press Ctrl + H to open Find and Replace.
  2. Click inside the Find what field and press Ctrl + J. The field appears empty because LF is a non-printing character, but it is captured.
  3. Type a single space in Replace with to swap every line break for a space, or leave the field empty to join lines directly.
  4. Click Replace All. Excel reports how many replacements were made inside the active selection.

This approach catches CRLF, standalone CR, and standalone LF because Find & Replace works at the character level. It does not catch U+2028 or U+2029, and it cannot distinguish between line-break types when reporting counts.

SUBSTITUTE formulas

SUBSTITUTE handles one character at a time and is the cleanest way to keep the original cell intact while producing a cleaned copy in a helper column:

  • =SUBSTITUTE(A1, CHAR(10), " ") replaces LF with a space.
  • =SUBSTITUTE(A1, CHAR(13), "") removes CR.
  • =TRIM(SUBSTITUTE(SUBSTITUTE(A1, CHAR(13), ""), CHAR(10), " ")) handles CRLF as two passes and trims redundant spaces.

These formulas do not touch U+2028 or U+2029, because CHAR() only produces values up to 255. To strip the Unicode separators, you need Unicode-aware functions such as UNICHAR(8232) for U+2028 and UNICHAR(8233) for U+2029 in modern Excel builds.

CLEAN function

=CLEAN(A1) strips the first 32 non-printable ASCII characters, which includes CHAR(13) and CHAR(10). It does not affect U+2028 or U+2029. Use it when you only need to remove line breaks and want to leave other whitespace untouched.

Where each method falls short

The pattern is consistent across all three Excel-native methods: they handle CHAR(10) and CHAR(13), they often require a separate pass for CRLF, and they ignore the Unicode line and paragraph separators entirely. Add to that the practical limits:

  • Find & Replace acts on the selection only. If the sheet has hundreds of columns, you repeat it.
  • SUBSTITUTE formulas consume a helper column and need to be copied down before they can be deleted.
  • CLEAN leaves other characters in place but cannot target a single separator type for precise counts.

When the data was copied from a webpage, a PDF, or a JavaScript-rendered document, the line breaks you see visually can hide a mix of all five token types. A tool that recognizes every form and reports accurate counts gives you a verifiable result instead of a hopeful one.

Method CRLF Standalone CR Standalone LF U+2028 U+2029
Find & Replace with Ctrl+J Yes Yes Yes No No
SUBSTITUTE(CHAR(10)) Partial No Yes No No
SUBSTITUTE(CHAR(13)) Partial Yes No No No
CLEAN Yes Yes Yes No No
Line Break Remover Yes Yes Yes Yes Yes

Run an Excel range through the browser tool

The Line Break Remover runs entirely inside the browser tab, accepts up to 1,000,000 UTF-16 code units, and reports detected, removed, and remaining token counts after every pass. Use it when you have a copy of the range on your clipboard and want to replace it back into Excel in one shot.

  1. Open your workbook in Excel and select the cells containing unwanted line breaks.
  2. Copy the selection with Ctrl + C.
  3. Paste the content into the input area of the Line Break Remover.
  4. Choose one of the three modes: Replace with one space for prose that should flow as a single line, Remove completely for record-like values where joining words is acceptable, or Preserve paragraphs for content where blank lines separate paragraphs.
  5. Click the processing action to run the transformation. The result panel updates with the output, and the statistics row shows three numbers: detected tokens, removed tokens, and remaining tokens.
  6. Click Copy output. If the browser blocks clipboard access, manually select the text in the result panel.
  7. Return to Excel, select the first cell of the original range, and paste the cleaned text back in place with Ctrl + V.

The clipboard step is asynchronous: if you edit the input or change the mode after clicking copy, the confirmation is invalidated and only the most recent generation can succeed. The result remains visible until you change the input or mode, which gives you time to verify before pasting back. The input budget is enforced before any allocation, so a paste that exceeds one million UTF-16 code units is rejected with an explicit message rather than being silently truncated.

Pick the right mode for your data

The three modes are explicit about what they change and what they leave alone. Choosing the wrong one either leaves line breaks in your data or removes them when you needed paragraph structure preserved.

Mode What happens to each recognized token Best for
Replace with one space Every CRLF, CR, LF, U+2028, U+2029 becomes one ordinary space. Repeated spaces in the source stay repeated. Hard-wrapped prose, sentence fragments inside a cell, addresses where a space is the right separator.
Remove completely Every token is deleted with no replacement. Words separated only by a line break are joined directly. Machine-readable IDs, codes that were line-wrapped in the source, exported values where spacing never had meaning.
Preserve paragraphs A single token becomes one space. A run of two or more consecutive tokens becomes exactly two LF characters, normalized as one blank-line boundary. Imported paragraphs where blank lines between them carry meaning but single soft wraps do not.

The tool never trims the beginning or end, collapses repeated spaces, expands tabs, changes non-breaking spaces, normalizes Unicode text, or alters punctuation and letters. That contract is what makes the output safe to paste back into Excel: only the recognized line-break tokens change.

Token types the tool recognizes

The five recognized tokens are documented in the JavaScript and ECMAScript lexical grammar specs as the canonical line terminators:

  • CRLF (U+000D U+000A) — counted as a single combined token, not two removals.
  • Standalone CR (U+000D) — common in older Mac text and some mainframe exports.
  • Standalone LF (U+000A) — what Excel itself inserts with Alt+Enter.
  • U+2028 LINE SEPARATOR — common in JavaScript-rendered text and JSON exports.
  • U+2029 PARAGRAPH SEPARATOR — common in document systems that use the Unicode separator pair.

According to the ECMAScript Language Specification on line terminators, these five characters are treated as distinct token types rather than interchangeable line endings, which is why a count-based tool can give you an exact answer instead of a rough one.

Verify the cleanup with Excel formulas

Once the result is on your clipboard, paste back into the same range you copied from. If you need to keep the original cells intact, paste into an empty column with Paste Special > Values only, then verify with =LEN(B1) against =LEN(A1): a clean replacement produces a smaller length count whenever any line breaks were actually removed. Run =ISNUMBER(SEARCH(CHAR(10), B1)) to confirm no LF remains, and repeat for CHAR(8232) and CHAR(8233) if your source might have included U+2028 or U+2029.

For a sanity check on the tool itself, compare the removed-token count to the difference in length you observe after pasting back. In a recent run with three paragraph-boundary runs of three consecutive tokens each, the input produced a paragraph-mode output where the reported numbers were: 9 detected, 3 removed, 6 remaining. The arithmetic 9 = 3 + 6 holds because each three-token run is converted to exactly two LF characters, removing one token per run.

When to stay inside Excel

Stay with Excel-native methods when the data lives inside one column and you only have CHAR(10) characters to remove. The browser path earns its keep when the range is wide, the source is unknown, or you need a verifiable count of what was actually removed. For one-off cleanup on a few hundred rows, SUBSTITUTE in a helper column is faster. For everything else, paste-copy-paste through a recognized-token tool gives you a result you can audit against the source.

For a deeper look, see Count Lines in Excel Without Writing a Formula.

For a deeper look, see Convert Number to Words in Excel in Rupees.