Fix Strange Boxes Appearing in Excel Cells After Copy and Paste
Question details
The user needs to remove unexpected square boxes that appear inside spreadsheet cells after transferring data.

- 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 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.
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.
Highlight the specific cells, columns, or rows that contain the unexpected boxes.
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.
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.
Make sure the 'Replace with' field is completely empty so that the tool deletes the character instead of substituting it.
Click the 'Replace All' button. Excel will remove all instances of the hidden character, and the strange boxes will disappear.

Use the CLEAN Function to Strip Formatting
If Find and Replace misses some characters, use the CLEAN formula to automatically remove all non-printable text characters from your data.
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. Open your file in WPS Spreadsheet: Launch WPS Office and open the workbook containing the strange boxes.
- 2. Access the Replace tool: Select the affected cells and press Ctrl + H to instantly open the Find and Replace dialog box.
- 3. Target the hidden characters: Paste the box character into the 'Find what' box and leave 'Replace with' completely empty.
- 4. Execute the cleanup: Click 'Replace All' to instantly strip the corrupted formatting blocks from your selected data.

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.




