Pad or strip leading zeros on postal codes, account IDs, and phone numbers
Pad numbers with leading zeros to meet fixed-width requirements (e.g. 00123) or strip unnecessary leading zeros.
Interactive Sample Data
| account_id | branch_code | postal_code | balance |
|---|---|---|---|
| 00045210 | 5 | 100 | 12400.00 |
| 00089400 | 12 | 80100 | 3450.50 |
| 00012900 | 2 | 4100 | 98200.00 |
| 00098010 | 15 | 30100 | 1500.00 |
How this tool works
Things that usually go wrong
- Excel Re-Stripping Zeros on Open: If you double-click the CSV in Excel, Excel strips zeros again! Export as .xlsx or import as text to preserve padding.
- Values Already Longer Than Target Width: If a value has 6 digits and target is 5, DataFix keeps the original 6 digits rather than truncating data.
- Non-Numeric Characters in Cells: Alphanumeric codes like "A-12" are preserved without broken padding.
Edge cases we tested
Safely handled without schema corruption.
Sanitized prior to processing.
Streamed via client-side Web Worker without tab freezing.
Frequently Asked Questions
How do I fix US ZIP codes that lost their leading zero (e.g. 2138 -> 02138)?
Select the ZIP column and use "Pad to 5 digits" to restore the leading zero.
Can it strip leading zeros from invoice numbers?
Yes! Select "Strip all leading zeros" to turn "000123" into "123".
What happens to values that already have the correct length?
Values that already match the target length are left unchanged.
Is my data private?
Completely. All data processing occurs locally within your browser sandbox via Web Workers.
Related tools
Fix ZIP and Postal Codes
Repair postal codes damaged by Excel auto-truncation, format US ZIP+4, and standardize UK and Canadian formats.
Open Tool →CSV to Excel
Transform CSV files into native Excel workbooks (.xlsx) with preserved leading zeros and styled header rows.
Open Tool →Trim Whitespace
Clean up accidental leading, trailing, and duplicate spaces across all columns in your spreadsheet.
Open Tool →