logo
search
Formatting Issues

Fix Strange Boxes Appearing in Excel Cells After Copy and Paste

Partner EditorPartner Editor Oct 10, 2026 872 views

Question details

The user needs to remove unexpected square boxes that appear inside spreadsheet cells after transferring data.

How to Fix Strange Boxes in Excel Cells After Copying and Pasting
Product
Excel
Device & OS
not provided
Scenario
Copying and pasting data contents between new or different spreadsheets.
Observed behavior
Strange boxes appear in the cells along with the pasted text, which cannot be fixed by clearing formulas, removing conditional formatting, or repairing the Office installation online.
Before you start

Before modifying your spreadsheet, try to highlight and copy a single instance of the strange box character directly from the formula bar, as you will need to paste it into the search dialog later.

Solution 1Recommended

Remove Non-Printing Characters using Find and Replace

Use Excel's built-in Find and Replace tool to quickly locate the hidden formatting characters causing the boxes and delete them all at once.

When copying data from other sources or spreadsheets, non-printing characters (like line breaks or unsupported spacing) can carry over. Excel displays a square box when it encounters a character it cannot render in the current font.

1
Select the affected data

Highlight the specific cells, columns, or rows that contain the unexpected boxes.

2
Open Find and Replace

Navigate to the Home tab on the ribbon, click on 'Find & Select' in the Editing group, and choose 'Replace' from the drop-down menu. Alternatively, press the Ctrl + H shortcut.

3
Input the unwanted character

In the 'Find what' field, paste the box character you copied earlier. If the box is caused by a line break, click inside the 'Find what' field and press Ctrl + J to insert a carriage return.

4
Clear the replacement field

Make sure the 'Replace with' field is completely empty so that the tool deletes the character instead of substituting it.

5
Replace all instances

Click the 'Replace All' button. Excel will remove all instances of the hidden character, and the strange boxes will disappear.

Remove Non-Printing Characters using Find and Replace
Tip: If you cannot copy the box character directly, you can also try using the CLEAN function in an adjacent column to strip out unprintable text.
Advanced Data Cleanup

Easily Clean Up Spreadsheet Data with WPS Office

WPS Spreadsheet provides a seamless and powerful alternative for managing messy data. You can quickly remove unwanted non-printing characters using its intuitive Find and Replace tools or built-in text formulas, ensuring your spreadsheets remain clean and professional.

  1. 1. Open your file in WPS Spreadsheet: Launch WPS Office and open the workbook containing the strange boxes.
  2. 2. Access the Replace tool: Select the affected cells and press Ctrl + H to instantly open the Find and Replace dialog box.
  3. 3. Target the hidden characters: Paste the box character into the 'Find what' box and leave 'Replace with' completely empty.
  4. 4. Execute the cleanup: Click 'Replace All' to instantly strip the corrupted formatting blocks from your selected data.
100% format compatibility with Microsoft Excel (.xlsx, .xls) filesFamiliar Find and Replace tools for rapid text formatting and data cleanupBuilt-in CLEAN and TRIM functions that work exactly like ExcelLightweight application that runs smoothly without lagging on heavy datasets
microsoft office alternative - wps office

Frequently Asked Questions

Why do strange boxes appear when I copy text from a website to a spreadsheet?

When copying text from websites or PDFs, background HTML codes, non-breaking spaces, or line breaks are often copied along with the text. The spreadsheet program does not know how to display these hidden formatting codes, so it substitutes them with generic square boxes.

Can the TRIM function fix the square boxes in my cells?

The TRIM function is excellent for removing extra standard spaces between words, but it often ignores non-printing characters like line breaks or unrecognized font symbols. To properly fix the boxes, you should use the CLEAN function, or combine them as =TRIM(CLEAN(A1)).

How do I find and replace a carriage return or line break?

Open the Find and Replace dialog using Ctrl + H. Click inside the 'Find what' input field and press Ctrl + J. This inserts a hidden carriage return (you will see a tiny blinking dot). Leave 'Replace with' blank and click Replace All to remove the line breaks causing the boxes.

Will changing the font hide the square boxes?

Sometimes. A square box usually means the current font lacks the glyph to display that specific character. Changing the font might reveal what the character actually is (like a foreign language symbol), but if it's a non-printing system character, the box will remain regardless of the font.