Keep leading zeros

CSV to Excel converter

Keep leading zeros, SKU codes, ZIP+4, phone numbers and long IDs as text. Preview locally — nothing is uploaded.

YOUR WORKBENCHLocal processing
  1. 01 Add data
  2. 02 Review
  3. 03 Export

Start with your source.

Loads the same teaching content as the public /samples/ CSVs into this page. Nothing is uploaded. Pick one, then Preview. The status line states the expected preflight outcome and an honest limit. You can also download leading-zeros.csv, scientific-notation.csv, date-looking-text.csv, phone-numbers.csv, sku-codes.csv, zip-plus-4.csv or long-ids.csv.

CSV/text only: 5 MiB, 20,000 records, 256 columns, 250,000 cells. Processing stays in your browser. Keep an original copy.

Auto detection suggests a separator. Export is blocked only when detection is uncertain — if Comma (or another choice) is already selected and confirmed, you do not need to resolve it again.

Encoding applies to selected files. Pasted text is already decoded by your browser.

Keyboard: Ctrl or ⌘ + Enter runs Preview from the workbench. Escape moves focus to the error if one is shown. Undo last change restores the previous file, paste, sample or clear.

Add a file, paste some text, or try the example. Nothing is uploaded.

Text by default in Excel; choose numeric columns deliberately. CSV has no column types. Keep the original and check the downloaded file.

Why preserve identifiers as text?

A code such as 00127 is not a quantity. Every column starts as Text to preserve identifiers and formula-like strings. In Excel column types, explicitly choose Number for quantities or a two-decimal display for amounts. Unsafe number values block XLSX download and identify their source records. Empty number fields remain blank, and headers stay text. No dates or formulas are inferred. You can also export this result as CSV, which has no column types. Renaming a CSV to .xlsx does not create a workbook. Ready downloads use a -converted suffix so they do not replace the original CSV.

Keep leading zeros → · Keep ZIP and ZIP+4 → · Keep long IDs as text → · Keep date-like text from becoming dates → · Large numbers and scientific notation → · Fix a one-column CSV →

Inputs this converter accepts

Choose a .csv, .tsv or .txt file, load a problem sample, or paste CSV text. File encoding applies to chosen files only; pasted text is already decoded by the browser. Input delimiters are comma, semicolon, tab and pipe, with Auto as a suggestion you must confirm in the preview. The first record can be a header. Limits: 5 MiB, 20,000 records including the header, 256 columns, 250,000 cells, 32,767 characters per field. Existing Excel workbooks are not inputs.

What you download

Default output is one XLSX worksheet. Every column starts as Text. You may mark true quantities as Number or two-decimal display; unsafe numbers block the download and name their source records. CSV export is available and has no column types. Ready files use a -converted suffix (plus -matched for a filter export) so they do not replace the source. Ctrl or ⌘ + Enter runs Preview. Undo last change restores the previous file, paste or sample.

What CSV to Excel cannot do

A CSV to Excel example: identifiers stay text

This synthetic export has a product code, a postal code and a long reference. By default the XLSX download stores each field as text, including the quantity. To calculate with quantity, open Excel column types and explicitly choose Number for that column. Keep the other three columns as Text.

product_id,postal_code,reference,quantity
00127,02108,12345678901234567,12
Expected cells with the default Text settings
FieldStored textWhat to check
product_id00127Both leading zeros remain.
postal_code02108The first zero remains.
reference12345678901234567All 17 digits remain.
quantity12Text by default; choose Number for this column when arithmetic is needed.

Compare this export with Excel text import →

Check more than the first few records

The preview displays twenty data records per page and every parsed column. Scroll inside the table for wide files, use Next for later records, or filter a specific column. The source record number is a preview label, never an extra output column. Quoted line breaks belong to a field, so a record can span several physical lines.

Choose All result records to export the complete result, or Only records matching the filter to export all matches across all pages. The current preview page does not determine the download. The header, when enabled, is retained in either export. Zero matches disable a matching export.

What happens to my original file?

The selected CSV is read locally. The XLSX or CSV download is a new file named with -converted. The original is not overwritten. Changing input or column types disables export until you preview again. Clear input releases the tool's current data references; Undo last change restores the previous paste or sample.

Can this recover already-missing zeros or characters?

No. Use the original export. A text workbook cannot invent zeros, expand an exponent, or reconstruct replacement characters. See repair versus re-export.

What does the local preflight summary actually check?

After Preview, it reports encoding/BOM hints, delimiter certainty, empty rows, whole-row duplicate risk, identifier risks (leading zeros, 16+ digit tokens, exponents, ZIP+4 shapes, plus-prefixed phones), header blanks/duplicates, date-looking text, formula-like fields, edge whitespace and replacement characters. Each row includes a What to do step. It is heuristic, runs only in this browser, and does not change your file. You can download that summary as a CSV.

Why is download blocked, and what is the file named?

Download stays disabled when the delimiter is uncertain, nonempty records have uneven widths, the export scope is empty, or a chosen Number column is not a plain decimal. The status line under the button names the next step. Ready workbooks use -converted, plus -matched when you export only filter matches.

How can I prove nothing was uploaded?

Open DevTools → Network, preserve the log, then preview and download a synthetic file. Your CSV fields should not appear in a POST body. Static assets and optional analytics beacons are expected. See the prove zero-upload guide.

How do I keep SKUs, ZIP codes and phone numbers intact?

Leave identifier columns on Text (the default). Choose Number only for true quantities. Scene guides cover SKUs, ZIP+4, phone numbers and long IDs.

Sources: RFC 4180: CSV format; Microsoft: duplicate records. Behaviors and limits above describe TableMender specifically.