
KEY TAKEAWAYS:
- Automatic text wrapping adjusts to column width, while manual line breaks remain part of the cell contents even after you turn off Wrap Text.
- You can turn off wrapping from the Home tab or the Format Cells dialog. To remove manual line breaks, use Find and Replace to update the original cells or SUBSTITUTE to return cleaned text in a separate column.
Wrapped text makes long descriptions easier to read, but it can also make rows taller and harder to scan. This guide explains how to unwrap text in Excel, remove manual line breaks, and fix display issues such as cut-off text or rows that stay too tall. It also includes a Python example for turning off automatic wrapping across multiple workbooks.
Automatic Text Wrapping vs. Manual Line Breaks
Text can appear on multiple lines in an Excel cell because of its Wrap Text setting or manual line breaks in the cell contents.
- Automatic text wrapping. When you turn on Wrap Text, Excel wraps text to fit the column width. Resizing the column can change where the text wraps.
-
Manual line breaks. In Excel for Windows, you can insert a line break at a specific point in the text by pressing Alt + Enter while editing a cell. A formula can also return text with a line break using
CHAR(10).
For example, if Excel wraps “North Region” onto two lines because the column is narrow, widening the column can bring both words onto one line. If you press Alt + Enter after “North,” the line break remains in the text even when the column is wide enough for both words.
Automatic text wrapping and manual line breaks can occur in the same cell. When you turn off Wrap Text, Excel stops wrapping the text to fit the column. Any line breaks remain in the cell contents and can be removed separately if needed.
Turn Off Automatic Text Wrapping in Excel
The steps below use the desktop version of Excel for Windows.
Option 1: Using the Home Tab
The most straightforward way to unwrap text in Excel is to use the Wrap Text button on the Home tab.
-
Select the cells that have Wrap Text turned on.
-
On the Home tab, find Wrap Text in the Alignment group.

-
Click the button to turn wrapping off.
Tip: If only some of the selected cells have Wrap Text turned on, the first click turns it on for the entire selection. Click the button again to turn wrapping off for all selected cells.
Option 2: Using the Format Cells Dialog
If you need to turn off text wrapping and adjust the cells’ horizontal or vertical alignment at the same time, it’s more convenient to use the Format Cells dialog box.
-
Select the cells you want to format.
-
Press Ctrl + 1 to open the Format Cells dialog box. You can also right-click any cell in the selection and choose Format Cells.
-
On the Alignment tab, find Wrap text under Text control. If the checkbox shows a mark, click it until the box is empty.

-
Click OK.
Option 3: Using a Keyboard Shortcut
If you often change the wrapping setting or prefer working with the keyboard, use the ribbon shortcut.
- Select the cells you want to format.
- Press Alt, then H, then W, releasing each key before pressing the next. If Wrap Text is on for all selected cells, this turns it off.
Note: The shortcut works the same way as the Wrap Text button on the ribbon. If only some of the selected cells have wrapping turned on, run the full sequence twice to turn it off for all of them. If wrapping is already off for all selected cells, the shortcut turns it on.
The screenshot below shows the same cells with Wrap Text on and off.

Remove Manual Line Breaks in Excel
Manual line breaks remain in the cell contents even after you turn off Wrap Text. You can replace them with spaces or remove them altogether.
Option 1: Remove Line Breaks with Find and Replace
Best for: Removing line breaks directly from the original cells.
-
Select the cells you want to clean, such as
B2:B20. -
In Excel for Windows, press Ctrl + H to open the Find and Replace dialog box.
-
Clear the Find what field, then press Ctrl + J once to enter a line-break character.
-
In the Replace with field, enter a space.

-
Click Replace All.
Result:
Excel replaces the line breaks with spaces, joining the separate lines into continuous text.

If you want to remove the line breaks without inserting spaces, leave Replace with empty. However, this may cause adjacent words to run together. For ordinary text, replacing line breaks with spaces is usually safer.
Note: After pressing Ctrl + J, the Find what field may appear blank because the line-break character is not visible. Also, check the search scope before clicking Replace All to avoid changing unintended cells.
Option 2: Remove Line Breaks with the SUBSTITUTE Function
Best for: keeping the original entries and returning the cleaned text in a separate column.
If your original text is in B2:B20, enter this formula in an empty cell like C2, then fill it down to C20.
=SUBSTITUTE(B2,CHAR(10)," ")
In this formula, the SUBSTITUTE function replaces each line-feed character (CHAR(10)) with a space. To remove the line breaks without adding spaces, use:
=SUBSTITUTE(B2,CHAR(10),"")
Text imported from external systems may also contain carriage returns (CHAR(13)), either alone or paired with line feeds (CHAR(10)). The following formula replaces each CRLF pair with a single space, then replaces any remaining carriage returns or line feeds with spaces:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B2,CHAR(13)&CHAR(10)," "),CHAR(13)," "),CHAR(10)," ")
After reviewing the results, copy the formula cells (for example, C2:C20), select the first cell in the original range (B2 in this example), and paste the results as values to replace the original entries.
Display Issues After Turning Off Wrap Text or Removing Line Breaks
1. Text Is Cut Off
When Wrap Text is off, left-aligned text can extend into empty cells to the right. For example, if the text in B2 is wider than column B and C2 contains data, Excel shows only the part of the text that fits in B2.
If the text was entered directly in B2, select the cell and check the formula bar to see the full entry. To show the full text on the worksheet, choose the option that fits your layout.
- Widen the column. Double-click the right edge of the B column heading to AutoFit column B. If that makes the column too wide, drag the edge to set the width manually.
- Use Shrink to Fit. If the column width needs to stay the same, select the affected cells and press Ctrl + 1 in Excel for Windows to open Format Cells. On the Alignment tab, under Text control, select Shrink to fit and click OK. Excel reduces the displayed font size to fit the column. This works well for short labels. Longer entries may be harder to read at the reduced size.
2. Rows Are Still Too Tall
If you previously set the row height manually, it may stay the same after you turn off Wrap Text or remove line breaks. Double-click the boundary below the row heading to fit the row to its contents. You can also select the rows you want to adjust and choose Home > Cells > Format > AutoFit Row Height.
Advanced: Unwrap Text in Excel Programmatically with Python
If you need to unwrap text in multiple Excel workbooks, opening each file to change the same setting can get tedious. With Free Spire.XLS for Python, you can turn off Wrap Text in the same range across a folder of reports in one run.
Step 1: Install Free Spire.XLS for Python
Run this command in your terminal.
pip install Spire.Xls.Free
Step 2: Turn Off Wrap Text in Multiple Excel Workbooks
This example turns off Wrap Text in B2:B20 on the first worksheet of each .xlsx file. Change "B2:B20" in the script if your reports use a different range.
-
Create a folder named
inputand place your.xlsxfiles in it. -
Save the following code as
unwrap_workbooks.pyalongside theinputfolder.from pathlib import Path from spire.xls import ExcelVersion, Workbook input_dir = Path("input") output_dir = Path("unwrapped") output_dir.mkdir(exist_ok=True) for source in sorted(input_dir.iterdir()): # Skip directories, other file formats, and Excel lock files. if ( not source.is_file() or source.suffix.lower() != ".xlsx" or source.name.startswith("~$") ): continue workbook = Workbook() try: workbook.LoadFromFile(str(source)) sheet = workbook.Worksheets[0] sheet.Range["B2:B20"].Style.WrapText = False output_file = output_dir / source.name workbook.SaveToFile(str(output_file), ExcelVersion.Version2016) print(f"Saved: {output_file}") except Exception as error: print(f"Failed to process {source.name}: {error}") finally: workbook.Dispose() -
Open a terminal in the directory containing
unwrap_workbooks.pyand run the script.python unwrap_workbooks.py
After running the script, you will find the updated workbooks in the unwrapped folder.
Note:
- The script turns off Wrap Text in the specified range. Manual line breaks remain in the cell contents. To remove them, use Find and Replace or the
SUBSTITUTEfunction described above. - When reading or writing
.xlsfiles, Free Spire.XLS for Python is limited to five worksheets per workbook and 200 rows per worksheet. These limits do not apply to.xlsxfiles, which are used in this example.
Frequently Asked Questions
Can I remove just one line break from an Excel cell?
Yes. If the line break was entered directly in the cell, double-click the cell to edit it, place the cursor at the start of the line after the break, and press Backspace. Add a space if the words on either side should stay separate, then press Enter.
Why didn’t Find and Replace remove all the line breaks?
The Find and Replace method above looks for line feeds (CHAR(10)). If a formula generates the remaining line breaks, use SUBSTITUTE in another cell to clean the formula’s result. Imported text may also contain carriage returns (CHAR(13)). In that case, use the formula above that handles both carriage returns and line feeds.
Will turning off Wrap Text change the values or formulas in my cells?
Turning off Wrap Text changes the cell formatting. Cell values, formulas, and any manual line breaks in the text are preserved.