Zero Pad IDs

A loader typed your ID column as a number and 00042 came back as 42. Paste the table, pick the column and the width, and get the codes back — nothing else in the file changes.

Try:
Fixed table

About this tool

Zero Pad IDs repairs the identifier column that was accidentally treated as a number. If a spreadsheet, export job, or database loader turned 00042 into 42, paste the CSV/TSV table here, choose the affected column, and pad it back to the required width without changing the rest of the row.

Worked example: with columns = id and width = 5, this input:

id,name
42,ada
7,linus
12345,grace

becomes:

id,name
00042,ada
00007,linus
12345,grace

Use width = 0 to auto-fit each selected column to its widest eligible value, mode = strip to remove leading zeros instead, and quote_style = always when a downstream spreadsheet needs every padded code to look explicitly like text. Inputs are capped at 5,000,000 bytes. Blank cells are left blank, and real digits are never truncated to make an over-wide value fit.

FAQ

How do I select the ID column?

With header enabled, use column names such as id, zip, or account. You can also use 1-based positions such as 1 or 1,3. Leaving columns blank rewrites every column, which is useful for a one-ID-per-line list but risky for a table that also contains prices or counts.

What does width 0 do?

width = 0 means auto-fit. Each selected column is padded to the length of its widest eligible value, so 42, 7, and 12345 become 00042, 00007, and 12345 without you having to know the target width ahead of time.

Will it corrupt alphanumeric codes or blank cells?

By default, no. Blank cells stay blank, and values that are not plain digits, such as SKU-9, N/A, -42, or 1.5, are copied through unchanged. Set non_numeric = pad only when you intentionally want to pad alphanumeric codes.

How do I stop spreadsheets from removing the zeros again?

Set quote_style = always so every output field is quoted, then import the column as text in your spreadsheet or loader. Quoting helps many readers preserve the string form, but a program that forcibly casts the field to a number can still remove leading zeros.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool zero-pad-ids "id,name
42,ada
7,linus
12345,grace"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/zero-pad-ids/?input=id%2Cname%0A42%2Cada%0A7%2Clinus%0A12345%2Cgrace&delimiter=comma&columns=id&width=5&mode=pad&overflow=keep&non_numeric=keep&header=true&quote_style=minimal

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.