📝 Text

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.

Presets:


    

About the Number List Generator

Quick Answer: The Number List Generator creates custom numeric sequences with configurable starting numbers, ending limits, step intervals, prefixes/suffixes, and delimiters (commas, newlines, spaces). Supports zero-padding and random shuffling.

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.

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 floating-point numbers (IEEE 754 doubles, the same representation nearly every language uses) cannot represent most decimal fractions exactly. A classic symptom is 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 is added to the list, which cleans up that drift without limiting precision for standard calculations. The loop stopping condition also allows a tiny tolerance past the end value (plus or minus 0.000000001) for the same reason to prevent early termination.

Cryptographically secure Fisher-Yates shuffle

The Shuffle option pulls its randomness from crypto.getRandomValues() rather than Math.random(), ensuring that numbers driving each swap are cryptographically unpredictable. It runs an in-place Fisher-Yates shuffle across the generated array, guaranteeing an unbiased distribution of permutations across all elements.

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 100000. 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.

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 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 minus) as something to left-pad with zeros, produces a malformed 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 to 05, 15.

Frequently Asked Questions

Why does a decimal step sometimes show numbers with long trailing digits in other tools?

JavaScript numbers use IEEE 754 double-precision floating-point arithmetic, which cannot represent certain decimal fractions precisely. Repeatedly adding 0.1 introduces small rounding discrepancies such as 0.30000000000000004. This tool rounds every generated value to 9 decimal places to eliminate floating-point drift while maintaining high numerical accuracy.

How does the zero-padding feature handle negative numbers?

When zero-padding is enabled, the tool strips the minus sign before padding numeric digits to the maximum width and then reattaches the sign. This ensures that negative values display as -05 rather than invalid outputs such as 0-5.

Do I need to enter a negative step value to count downward?

No. The step field requires a positive magnitude. The tool compares your start and end values automatically and counts backward whenever the start value is greater than the end value.

What is the maximum limit on generated numbers?

Generation is capped at 100000 numbers to maintain browser responsiveness and prevent memory spikes. The tool checks an upfront count estimate and validates running length inside the generation loop.

Is the Shuffle option cryptographically secure?

Yes. When Shuffle is enabled, the tool uses crypto.getRandomValues() to supply random indices for the Fisher-Yates shuffle algorithm, ensuring an unbiased permutation without relying on predictable Math.random() values.

Are my generated numbers or sequences uploaded to any external server?

No. All calculations, formatting, padding, and randomizations execute completely inside your web browser. No numbers, parameters, or clipboard contents are ever transmitted across the network.

Can I generate decimal sequences such as 0.25 increments?

Yes. You can enter fractional step values like 0.1, 0.25, or 0.5. The generator automatically applies precision normalization to eliminate floating-point artifacts.

What delimiters are supported for separating numbers?

You can format your number sequence with newlines (one per line), commas, spaces, semicolons, or any custom text delimiter including prefixes and suffixes.

Can I use this tool to create randomized lottery or raffle ticket lists?

Yes. By specifying your ticket range and checking the Shuffle option, the tool performs a cryptographically unbiased Fisher-Yates shuffle, producing a non-repeating random sequence suitable for draws.

How does zero-padding improve sequential file naming?

Zero-padding (such as 001, 002... 100) ensures that standard operating system file browsers and command-line directory listings sort numbered files in strict chronological numerical order rather than lexicographic sorting (where 10 appears before 2).