Formatting Issues

How to Remove Hyphens from Social Security Numbers in Excel

Camila MilosovichCamila Milosovich Oct 21, 2026 869 views

Question details

The user needs to remove hyphens from Social Security Numbers (SSNs) or similarly formatted text strings to leave only the raw digits.

How to Remove Hyphens from Social Security Numbers in Excel
Product
Excel
Device & OS
not provided
Scenario
Cleaning up and standardizing data formatting by stripping out hyphen characters from standardized numeric strings.
Observed behavior
The data contains hyphens that need to be completely deleted from the cells to create a continuous string of numbers.
Before you start

Ensure that the cells containing your Social Security Numbers are formatted as 'Text' before you remove the hyphens, as converting them to standard numbers might cause Excel to accidentally delete any leading zeros.

Solution 1Recommended

Use Find and Replace to Remove Hyphens

The quickest and most efficient way to remove hyphens from multiple cells at once is by using Excel's built-in Find and Replace tool.

This method alters the data in your current cells directly. If you need to keep a copy of the original hyphenated numbers, make sure to duplicate your column before proceeding.

1
Select the Data

Click and drag to highlight the range of cells containing the Social Security Numbers you want to modify.

2
Open Find and Replace

Press the 'Ctrl + H' keyboard shortcut to immediately open the Find and Replace dialog box on your screen.

3
Execute Replace All

Type a single hyphen (-) in the 'Find what' field, leave the 'Replace with' field completely empty, and click the 'Replace All' button.

Format Check: Check your destination cells to confirm they are using the appropriate Text format so you don't lose leading zeros.
Free Excel Alternative

Easily Manage and Format Data with WPS Spreadsheet

WPS Spreadsheet provides powerful data processing tools, including Find and Replace and advanced text formulas, completely free. It is a highly compatible and lightweight alternative to Microsoft Excel.

  1. 1. Open your file in WPS Spreadsheet: Launch WPS Office and open the spreadsheet containing the Social Security Number data.
  2. 2. Select your data range: Highlight the specific column or cells where you want to remove hyphens.
  3. 3. Use Find and Replace: Press Ctrl+H, enter a hyphen (-) in 'Find what', leave 'Replace with' empty, and click Replace All.
Quickly remove unwanted characters like hyphens using the built-in Find and Replace tool.Fully compatible with Microsoft Excel file formats (.xlsx, .xls, .csv).Includes all standard Excel text manipulation functions like SUBSTITUTE and TEXT.Lightweight software with a familiar, easy-to-use interface that requires zero learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Will removing hyphens from SSNs delete leading zeros?

If your cells are formatted as General or Number, the application might drop the leading zeros when the hyphens are removed because it treats the result as a standard math number. To prevent this, format the column as Text before performing the Find and Replace operation.

Can I remove both hyphens and spaces at the same time?

The Find and Replace dialog only processes one specific character string at a time. To remove both, you will need to run the tool twice: once for the hyphen, and once for the space. Alternatively, you can use a nested formula: =SUBSTITUTE(SUBSTITUTE(A2, "-", ""), " ", "").

How do I format the numbers back to an SSN format later?

If you have a continuous 9-digit number and want it displayed as an SSN again, select the cells, press Ctrl+1 to open Format Cells, go to the Special category, and select Social Security Number.

Does the Find and Replace shortcut work in WPS Spreadsheet?

Yes, the Ctrl+H shortcut and the Find and Replace dialog function identically in WPS Spreadsheet, allowing you to quickly clean up formatted values just like you would in Microsoft Excel.