Random Number Generator
Generate random numbers in a custom range, with batch mode, unique draws, sorting and zero padding — handy for roll calls, lucky draws and group draws
范围与规则
最小值与最大值都可能被抽到(闭区间)。禁止重复时个数不能超过区间内可取值总数。
About this tool
Pick a range and generate random numbers. From 1-100 or any custom interval; draw one at a time or a whole batch. Whether repeats are allowed, whether results are sorted, whether numbers are zero-padded — it is all a checkbox away.
- Range and count: custom minimum, maximum and quantity, with negatives and decimal places supported
- Unique draws: results within one batch never repeat — ideal for lucky draws, roll calls and group picks; if the range is too small you get a clear notice instead of a broken result
- Sorting and format: one-click ascending or descending order, optional zero padding (007), easy to copy and export
- Draw-one mode: draw like a lottery machine with history, optionally excluding numbers already drawn
- Fairness: uses the browser's cryptographic random source
crypto.getRandomValues, more uniform thanMath.random()with no bias
Use cases
- Picking students at random in class
- Drawing winning numbers for raffles and livestreams
- Grouping players and drawing starting order
- Tabletop dice rolls and everyday yes-no decisions
Everything runs locally in your browser — no network, no logging.
Tips
- Interval is inclusive: both minimum and maximum can be drawn; 1-100 means 100 possible values
- Unique limit: with repeats disabled, the count cannot exceed the number of integers in the range — otherwise there is no mathematical solution
- Zero padding: keeps number tags and table IDs aligned in width and in sort order
- Reproducibility: every run gives new, non-replayable results; for reproducible randomness use a seeded generator in code