Random Number Generator
Generate random integers, decimals, dice roll totals, or arithmetic sequences in your browser. Configure range, count, decimal precision, dice notation, sequence start and step, duplicate handling, sorting, output format, zero-padding, and an optional reproducible seed, then copy the result with one click or download TXT, JSON, or CSV files for testing, sampling, classrooms, tabletop dice, game balancing, and quick analysis.
- Generate up to 5000 numbers locally in the browser, with no result sent to a server
- Switch between integer, decimal, dice, and arithmetic sequence modes
- Use standard dice notation such as 2d6 or 1d20+3 and optionally show every roll breakdown
- Lock a seed to reproduce the same batch later, or zero-pad integers to print 001 through 100
- Inspect count, min, max, sum, average, and median alongside the copyable output
Tap one to apply a common configuration. You can still adjust the fields after.
When locked, the same seed always produces the same batch — useful for tests and regressions.
Overview
The tool is built for practical batch number generation. Quick picks, repeatable ranges, tabletop dice, ordered sequences, reproducible regression data, and export-ready batches all live in the same workspace.
- 01
Random integers and decimals
Generate whole numbers or decimal values inside a custom range. Decimal mode supports 0 to 12 places, which fits prices, measurements, percentages, and analytics-style test values.
- 02
Dice notation and roll breakdown
Dice mode accepts standard notation such as 2d6, 1d20+3, and 3d8-1, and returns the total of each roll. Turn on the breakdown to also see every individual die and the modifier.
- 03
Arithmetic sequences
Sequence mode generates ordered values from a start number and step. The output is deterministic and works for predictable samples rather than random results.
- 04
Duplicate control and sorting
Integer and decimal modes can avoid duplicate values when the range has enough room, and you can sort the output ascending or descending before copying or exporting.
- 05
Reproducible seed
Lock a seed and the same configuration will always produce the same batch — useful for test fixtures, regression cases, classroom demos, and anywhere a previous random result needs to be reproduced.
- 06
Zero-padding and multi-format export
Integer mode can zero-pad output to a fixed width to print aligned lists such as 001 through 100. The output stays plain text and exports as TXT, JSON, or CSV for spreadsheets, scripts, fixtures, and QA notes.
How to use
Start with the number type, then set the constraints. The result updates automatically after configuration changes, and the bottom command row handles copy and download actions.
- 01
Choose Integer, Decimal, Dice, or Sequence mode.
- 02
For integer and decimal modes, set the range, count, and precision. For dice mode, enter a notation such as 2d6+3. For sequence mode, set the start value, step, and count.
- 03
Turn on No duplicates in batch when each value must appear only once and the range can support it.
- 04
When the same batch should be reproducible, enable Lock seed and type or shuffle a seed value.
- 05
Keep the natural order, sort ascending, or sort descending. Integer mode can also zero-pad each value to a fixed width.
- 06
Copy the visible output, or download TXT for a simple list, JSON for scripts, or CSV for spreadsheets.
Details
Different number tasks need different rules. Pick the mode that matches how the result will be used downstream.
- Use Integer mode for random picks, lottery-style draws, index values, test counts, classroom examples, simple sampling, and aligned ID lists.
- Use Decimal mode when sample values need fractional precision, such as prices, measurements, percentages, or mock analytics data.
- Use Dice mode for tabletop RPGs, board games, probability demonstrations, and game design experiments, with familiar notation such as 2d6 or 1d20+3.
- Use Sequence mode for ordered lists with a fixed step. The output is deterministic and good for row numbers, coordinates, and node positions.
- Use No duplicates in batch when the same value must not repeat inside one generated batch.
- Use Lock seed for test fixtures, regression cases, classroom demos, and any workflow that must reproduce the same numbers.
- Use JSON export for scripts and fixtures, CSV for spreadsheets, and TXT for quick copy-and-paste lists.
Use cases
This page is most useful when you need a controlled batch of numbers quickly and the values do not need to behave like permanent identifiers or security credentials.
-
Testing and QA data
Generate counts, sample IDs, mock scores, retry intervals, random inputs, and boundary values. Combined with a locked seed, each test run can read the exact same randomized dataset.
-
Tabletop and board game dice
Dice mode reads notation like 2d6, 1d20+3, and 4d6 directly. Turn on the breakdown to see the value of every die — useful for D&D, tabletop RPGs, probability demos, and game balancing.
-
Classrooms and probability examples
Prepare number lists for probability lessons, statistics exercises, sampling labs, and quick distribution demonstrations. The stats bar shows sum, average, and median for each batch.
-
Draws and lightweight decisions
Pick random rows, assign test cases, order seating, run informal draws, or prepare small randomized lists for internal work.
See also
If a generated number will become a stable database row, order, ticket, or API object identifier, design the final shape in the ID Generator instead of treating a random draw as an ID policy. When the next dataset needs token-like text, slugs, labels, or template codes instead of numeric values, move to the Random String Generator for character-set, length, and format controls. When the test requires fully structured JSON rather than a plain list of numbers, use the Fake Data Generator to generate mock records with named fields, arrays, and locale-aware data.
Output format reference
Choose the format that matches the next tool in your workflow. When integer mode uses zero-padding, the TXT, CSV, and per-line outputs include the padded form, while the JSON array keeps the original numeric type.
Format
One per line
Example
42 17 93
Notes
Best for quick copying into notes, terminals, forms, test cases, or simple lists.
Format
Comma separated
Example
42, 17, 93
Notes
Useful for short inline examples, documentation snippets, and quick manual entry.
Format
JSON array
Example
[42, 17, 93]
Notes
Best for scripts, fixtures, API examples, and developer tooling. Always raw numbers, not strings.
Format
Dice breakdown
Example
12 (3+6+3)
Notes
Per-line output for dice mode when the breakdown is enabled. The parentheses show each die value and the modifier.
Format
Zero-padded integer
Example
001, 042, 100
Notes
Integer mode uses this when zero-pad width is set. Good for ID lists, ticket numbers, and ordered filenames.
Format
CSV download
Example
index,value
Notes
Best for spreadsheets and QA handoff. After sorting, the row index reflects the sorted order.
Best practices
A number generator is most useful when the rule matches the task. If a number becomes an identifier, a password, or a permanent business record, the surrounding process matters as much as the generated value.
- For no-duplicate integer output, make sure the range contains at least as many possible values as the requested count.
- For no-duplicate decimal output, remember that precision changes the available combination space.
- Only lock the seed when you actually need reproducibility, otherwise it is easy to think a fresh batch was drawn when it was not.
- When generating aligned ID lists, set the zero-pad width to match the widest value you expect — narrower padding has no effect.
- Skip sorted output when the original random order matters for the task. Sorting also renumbers the index used in CSV export.
- Dice mode simulates the mathematical sum of dice — audited drawings and regulated processes need a formal procedure and records.
- For spreadsheets, CSV is usually easier to import than comma-separated text. For scripts, JSON arrays are easier to parse. For human review, one number per line is clearest.
Limitations
The tool is helpful for local generation and test data, but it is not a regulated drawing system, a production sequence service, or a security credential generator.
- Browser-generated numbers are convenient for tests, demos, and everyday sampling, but audited lotteries and regulated draws need a formal process.
- Random numbers are not automatically good public identifiers. Sequential or short numeric values can be easy to guess.
- A decimal value with two places has far fewer unique combinations than the same range with six places.
- Dice mode returns the total of all dice. Turn on the breakdown to see each die value alongside the modifier.
- Sequence mode is deterministic and should not be described as random output.
- Locking a seed switches to a standard pseudo-random algorithm — results are reproducible but it is not a cryptographic random source.
- For account secrets or access credentials, use a password or token-focused generator instead of this numeric utility.
FAQ
Answers to common questions about usage, data handling, result checks, and practical limits.
Can I generate unique random numbers?
Yes. In Integer and Decimal modes, turn on No duplicates in batch. The tool will warn you if the selected range and precision cannot produce enough unique values for the requested count.
What is the maximum batch size?
One batch is limited to 5000 generated values so the browser stays responsive while rendering, copying, and exporting the result.
Which dice notations are supported?
Dice mode accepts NdS or NdS±K, where N is the number of dice (1 to 100), S is the number of sides (2 to 1000), and K is an optional integer modifier. Examples: 2d6, 1d20+3, 4d8-1.
How do I reproduce the same batch later?
Enable Lock seed and provide any text or number as the seed. With the same configuration and seed, the tool produces the exact same batch — useful for test fixtures, regressions, and classroom demos.
How does zero-pad width work?
Set the width to any value greater than 0. Integer mode then pads each value with leading zeros in TXT, CSV, per-line, and comma output. For example, width 3 prints 7 as 007 and 42 as 042.
What does the dice breakdown in parentheses mean?
The parentheses list the value of each die in that roll plus the modifier. For example, 12 (3+6+3) means three dice rolled 3, 6, and 3 for a total of 12, and 18 (15+3) for 1d20+3 means a roll of 15 plus a modifier of 3.
Does decimal mode include the minimum and maximum values?
Decimal mode generates values within the selected range and rounds them to the chosen precision. Because rounding changes the final representation, duplicate control depends on the rounded value space.
Are the numbers generated on the server?
No. The tool runs in your browser tab and uses browser randomness. Your range, generated numbers, and exports are not sent to a server by this page.
Related tools
Use the generator category when number generation leads into identifiers, random strings, passwords, sample data, or hashing workflows.