Number List Generator
Set a start, end, and step value to instantly generate a list of numbers, with custom separators, zero-padding, and shuffle options.
About the Number List Generator
This tool builds a sequence of numbers from a start value to an end value using whatever step size you set. If the start is larger than the end, it automatically counts down instead of up, so you don't need to enter a negative step yourself. You can join the numbers with a comma, a comma and space, a new line on each entry, or any custom separator you type in, and optionally pad shorter numbers with leading zeros so every entry lines up to the same width.
- Direction, inferred automatically from whether start is less than or greater than end.
- Zero padding, every number is padded to match the width of the longest number in the generated list.
- Shuffle, uses the browser's cryptographic random number source for a fair, unbiased shuffle of the final order.
- Safety cap, generation is capped at 100,000 numbers so an overly wide range with a tiny step can't freeze your browser.
Decimal steps get rounded to correct for floating-point drift
Building a sequence with a non-integer step, like 0.1, means repeatedly adding that value in a loop, and JavaScript's floating-point numbers (IEEE 754 doubles, the same representation nearly every language uses) can't represent most decimal fractions exactly — the classic symptom being that 0.1 + 0.2 evaluates to 0.30000000000000004 instead of 0.3. Left uncorrected, that tiny drift compounds across a long sequence and starts showing up as numbers like 2.4999999999999996 instead of 2.5. This tool rounds every generated value to 9 decimal places (Math.round(n * 1e9) / 1e9) before it's added to the list, which cleans up that drift without meaningfully limiting precision for anything short of scientific-notation-scale decimals. The loop's stopping condition also allows a tiny tolerance past the end value (plus or minus 0.000000001) for the same reason — without it, accumulated floating-point error could make the loop stop one number short of where it should, silently dropping the final entry from an otherwise correct sequence.
The shuffle here is cryptographically random but not bias-corrected
Like this site's List Randomizer, the Shuffle option pulls its randomness from crypto.getRandomValues() rather than Math.random(), so the numbers driving each swap are cryptographically unpredictable. Where it differs is in how that random value gets mapped down to a list index: this tool takes the raw 32-bit value modulo the current range directly, while the List Randomizer runs a rejection-sampling step first to strip out the fractional remainder that a plain modulo leaves behind. In practice, for anything under 100,000 items the resulting bias from skipping that step is astronomically small — far smaller than one part in the number of items — but it means this shuffle isn't quite as mathematically exact as the dedicated randomizer tool, just extremely close to it.
The size cap is checked twice, before and during generation
Before building anything, the tool estimates how many numbers the range and step would produce and rejects the request up front if that estimate exceeds 100,000. But the loop that actually builds the list checks the running count against that same cap on every iteration too, as a second, independent backstop — because an estimate computed from floating-point division can occasionally be slightly off for unusual step values, and a hard check inside the loop guarantees the browser can never be made to generate an unbounded list even if the upfront estimate undercounted.
Zero-padding treats the minus sign correctly
When padding is on, the tool measures the digit width of the longest number in the list, ignoring the minus sign, then pads every entry's digits to that width and re-attaches the sign afterward if it had one. That ordering matters: padding a negative number the naive way, by treating the whole string (including its leading "-") as something to left-pad with zeros, produces a garbled result like -007 where the zeros end up in the wrong place relative to the sign. Stripping the sign first, padding just the digits, and reapplying the sign after keeps a range like -5 to 15 formatted consistently as -05, -04 … 05, 15.
Frequently Asked Questions
Why does a decimal step sometimes show numbers with long trailing digits?
That shouldn't normally happen — the tool rounds every generated value to 9 decimal places specifically to clean up the floating-point drift that repeatedly adding a decimal step in JavaScript can introduce, such as 0.1 + 0.2 landing on 0.30000000000000004 instead of exactly 0.3.
Is the Shuffle option exactly as unbiased as the List Randomizer tool?
Extremely close, but not identical in method. Both use crypto.getRandomValues() for cryptographically strong randomness, but this tool maps that value to a list index with a plain modulo operation, while List Randomizer adds an extra rejection-sampling step to eliminate the last trace of statistical bias that a plain modulo can introduce. For list sizes here, that difference is practically negligible.
What happens if my start, end, and step would generate too many numbers?
Generation is capped at 100,000 numbers. The tool estimates the count before starting and shows an error if it's too high, and also checks the count again during generation as a backstop, so an unusually large range with a tiny step can't be used to freeze the page.
Does zero-padding break negative numbers?
No. The tool strips the minus sign before padding the digits and reattaches it afterward, so a range including negative numbers pads correctly, like -05 rather than the incorrect 0-5 or -005 you'd get from padding the whole string including its sign.
Do I need to enter a negative step to count downward?
No. The step field only accepts positive values, and the tool automatically detects direction by comparing the start and end values — if start is greater than end, it counts down using your step size, without you needing to add a minus sign yourself.