Number zero fill
Add leading zeroes to the integer part of a number list up to a chosen width (1–100, default 2): signs and decimals stay as they are, longer numbers are never truncated, and blank lines are kept.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Zero-padded result
One number per line with leading zeroes added to the integer part; blank lines are kept as-is.
Enter a number list to see the result
Padded: 0 · Unchanged: 0 · Lines: 0
What this tool does
- Pad an index or serial list to a fixed width so it sorts and aligns as text: with width 2, 1, 12 and 123 become 01, 12 and 123.
- Give exported or fixture data a uniform length, for example turning month 1 into 01.
- Tidy numbers with signs or decimals: only the integer part is padded, so 3.5 becomes 003.5 and -7 becomes -007.
Example
Input
1 12 123
Output
01 12 123
Default width 2: 1 becomes 01, 12 already has two digits and 123 is longer than two digits so it is not truncated. The stats "Padded 1 · Unchanged 2" follow from that.
Frequently asked questions
Which width can I choose, and does it truncate numbers?
Any width from 1 to 100 (default 2). Zeroes are only ever added on the left, never cut off: 123 stays 123 at width 2. A width of 0, a negative number or a decimal is rejected outright.
How are decimals and signs handled?
Only the integer part is padded and the sign and fractional digits are kept as they are: 3.5 becomes 003.5 at width 3, -7 becomes -007 and +4 becomes +04. Values that are not plain numbers, such as 1,000 or "5 kg", are treated as invalid input.
Are blank lines removed?
No. Blank lines are kept exactly as they are and counted in both the line total and the unchanged total, because pasted lists often use them as separators. Only non-empty lines that are not plain numbers raise an error instead of being silently dropped.
Can it pad in binary or hexadecimal?
No. This tool only adds leading zeroes to decimal notation. It performs no base conversion (use the base converter for octal or hexadecimal) and adds no thousands separators.
Keywords:zero fillpad numbers