Random Things Generator
Generate random things from 15+ categories including animals, foods, countries, objects, and more. Cryptographically random selection with no repeats.
About
Uniform random selection is harder than it appears. A naive Math.random call produces pseudo-random numbers from a linear congruential generator with a period of roughly 232 states. This tool replaces it with crypto.getRandomValues, drawing from the operating system's entropy pool to produce unbiased indices across a corpus of over 500 items in 15 categories. Each draw applies rejection sampling to eliminate modulo bias when the pool size is not a power of two. The practical consequence: every item in a selected category has an equal probability p = 1n of appearing, where n is the active pool size.
The generator supports a no-repeat mode that removes drawn items from the pool until it is exhausted, then resets. This is equivalent to a Fisher-Yates shuffle drawn one card at a time. Note: with all 15 categories active the pool exceeds 500 items, so collisions are rare even without no-repeat mode. With a single small category (e.g., Emotions at 30 items), exhaustion occurs quickly. The tool tracks generation history per session so you can review or export previous results.
Formulas
Each random index is generated using cryptographic entropy with rejection sampling to eliminate modulo bias:
Where n is the total number of items in the active pool, maxUint32 = 4294967296 (232), and r is a uniformly distributed unsigned 32-bit integer. The rejection loop discards values in the incomplete final bucket so that every index 0 through n − 1 has exactly equal probability.
The probability of selecting any single item is:
In no-repeat mode, after k draws, the pool shrinks to n − k items. The conditional probability for the next draw becomes 1n − k. This is mathematically equivalent to revealing one card at a time from a pre-shuffled deck (Fisher-Yates).
Reference Data
| Category | Items Count | Example Items | Use Cases |
|---|---|---|---|
| Animals | 40 | Axolotl, Pangolin, Quokka | Drawing prompts, trivia |
| Foods | 40 | Kimchi, Croissant, Pad Thai | Meal planning, challenges |
| Countries | 50 | Bhutan, Iceland, Peru | Geography games, travel |
| Colors | 30 | Cerulean, Mauve, Vermilion | Art projects, design |
| Activities | 35 | Rock climbing, Origami, Stargazing | Boredom busters, dates |
| Objects | 40 | Kaleidoscope, Sundial, Compass | Writing prompts, improv |
| Professions | 35 | Cartographer, Sommelier, Arborist | Career exploration, games |
| Sports | 30 | Curling, Fencing, Kabaddi | Fitness challenges, trivia |
| Musical Instruments | 25 | Theremin, Sitar, Didgeridoo | Music discovery |
| Inventions | 30 | Printing Press, Telescope, Velcro | History lessons, trivia |
| Historical Events | 30 | Moon Landing, Fall of Rome | Education, writing |
| Plants | 30 | Venus Flytrap, Baobab, Sequoia | Gardening, botany |
| Emotions | 30 | Nostalgia, Euphoria, Melancholy | Acting, creative writing |
| Movies | 35 | Inception, Amélie, Spirited Away | Movie night picker |
| Books | 35 | Dune, 1984, Sapiens | Reading lists, clubs |