Excel Converter (CSV & JSON) · Tutorial

How to open a CSV in Excel without losing leading zeros

5 min readbeginnerUpdated

You open a customer list in Excel and the IDs lose their zeros, postcodes are shortened and accented names look broken. This tutorial converts the CSV to a real Excel workbook first, so every value arrives exactly as it was written, with no import wizard.

What you need

  • The Excel Converter, set to CSV → Excel
  • A CSV file, or the sample customer list from the Try it button
  • Excel, Google Sheets, Numbers or LibreOffice to open the result

Steps

  1. See the problem

    The sample has customer IDs like 000184, postcodes like 02108 and 0150, phone numbers starting with + and cities such as São Paulo and Tōkyō. Opened directly in Excel, the IDs become 184, 02108 becomes 2108 and the special characters may be garbled.

  2. Paste or open the CSV

    Paste the data into the left box or drag the file onto the drop area. The preview on the right shows the sheet with column letters and row numbers, and the message reads Ready: 6 rows. (the header plus five customers).

  3. Check the preview

    Look at the customer_id and postcode columns: the zeros are still there. Values with a leading zero, a plus sign or a dash are stored as text, while plain numbers would be stored as numbers.

  4. Name the sheet

    Type a name such as Customers in Sheet name. Excel shows it on the tab at the bottom of the workbook. Names can be up to 31 characters.

  5. Download the workbook

    Press Download .xlsx. Open the file in Excel or upload it to Google Sheets. Every value appears exactly as in the CSV, and the city names are spelled correctly.

Try it yourself

Opens the Excel Converter (CSV & JSON) with this tutorial's sample loaded.

Try it now

Common mistakes

Opening the CSV again afterwards
If you later double-click the original CSV, Excel will strip the zeros again. Share and open the .xlsx file instead.
Unticking Store numbers as numbers
That keeps everything as text, including amounts you may want to add up. Leave it on; values with leading zeros are protected either way.
Saving back to CSV from Excel
Saving as CSV from Excel can still lose formatting. If you need a CSV again, use Excel → CSV in the Excel Converter, which writes values exactly as stored.

Next steps

Go back to the Excel Converter (CSV & JSON), or keep going with one of these:

FAQ

Why does Excel remove leading zeros?

When it opens a CSV, Excel treats anything that looks like a number as a number, and numbers have no leading zeros. An .xlsx file can say that a cell is text, which stops this.

Can I add more sheets?

CSV → Excel makes one sheet per file. To build a workbook with several sheets, use JSON → Excel instead.