Methodology
Web Crypto, rejection sampling, and what this is not.
const buf = new Uint32Array(1) crypto.getRandomValues(buf) // map to [min, max] inclusive without naive modulo bias (rejection sampling)
About this page
ChanceKit's results are fair but not truly random. Each one comes from crypto.getRandomValues, the browser's cryptographically strong pseudorandom generator, mapped onto the range with rejection sampling so every outcome is exactly equally likely. In detail, the tools draw integers with the browser's Web Crypto generator, then map those integers onto heads, faces, list indexes, a numeric range, a letter, or a word from the bundled list. This page is the precise version of the fairness note linked from every tool.
The draw
The preferred call is crypto.getRandomValues on a one-element Uint32Array. That fills 32 bits from the platform's cryptographically strong pseudorandom generator. It is designed so the next output is not something a web page can predict from earlier outputs. It is still a deterministic algorithm inside the operating system, seeded from entropy the page cannot display. Calling it 'true random' would be false.
Mapping those bits onto a range with a remainder operator is slightly unfair when the range size does not divide 2^32. Lower remainders would occur once more than higher ones. ChanceKit uses rejection sampling: if the raw value falls in the leftover tail, it draws again. The values that remain map evenly onto the inclusive range. A coin is the range {0, 1}. A d20 is {1,…,20}. A wheel is {0,…,n−1}. A numeric page is {min,…,max}. A letter is an index into the 26-letter alphabet, or into the 5 vowels or the 21 consonants. A word is an index into the lemmas that match the list and the length. Several words, or letters with no repeats, are the first items of a Fisher-Yates shuffle of that pool, so every subset of the requested size is equally likely.
What the animation does
The result is fixed when you activate the control. The coin turn, the die shake, and the wheel rotation reveal that result. They do not draw a second time, and they do not take mouse speed into account. If you prefer reduced motion, the same result appears without the extra movement.
Compared with Math.random
Math.random is a common source and a poor one to leave undocumented. Engines have used generators that are fine for particles and unsuitable for anything an adversary might care about. ChanceKit does not use Math.random for outcomes, including coin flips, dice, wheels, numbers, words, letters, and Secret Santa pairings. Web Crypto is the stronger default already sitting in the browser, and it does not require a network call.
Compared with atmospheric noise
random.org has offered a true-random service based on atmospheric noise since the 1990s. That is a different product with a different threat model and a public explanation of physical entropy. Use it, or a lab source you trust, when a method section needs that kind of randomness. ChanceKit does not proxy those feeds, does not claim their properties, and does not ask you to pretend a browser PRNG is a radio receiver.
Words and letters
The letter generator uses the 26 letters of the English alphabet. Vowels are A, E, I, O, and U. Consonants are the other 21, and Y is a consonant on this page. That is a fixed rule so the odds can be stated exactly. It is not a claim about how English spells every word. Any letter is one draw from 26, so a vowel is 5 in 26. Choosing Vowels or Consonants replaces the pool before the draw. Case is applied after the letter is chosen. Uppercase and lowercase do not change the letter probabilities. Mixed case flips a fair coin for each letter already drawn. With no repeats, A and a count as the same letter.
Words are not built by sticking random letters together. Each generate tap draws from a bundled subset of WordNet 3.0, Princeton University's lexical database. The bundled lists hold 5,762 nouns, 2,612 verbs, 2,683 adjectives, and 793 adverbs: single alphabetic lemmas that the Semantic Concordance tagged at least twice. The any-word setting draws from the combined lists, 10,544 words once duplicates across parts of speech are collapsed. Animals (117), foods (85), and colors (30) are smaller editorial subsets. A lemma is filed under animals or foods when WordNet tags it in that lexicographer file, and the lists were then edited so a genus name or a body part is not offered as the creature or the meal. Egg is included in foods because that is the category people expect, even though its highest-tagged sense is biological. Chicken is in both. Colors are color names WordNet tags. Beige, cyan, and several other shade names are absent because this release does not tag them. Within the words that match the list and the length, every word is equally likely. The draw is not weighted by how often the word is printed.
An editorial exclusion list removes ethnic slurs, including clipped forms that have no other sense in this list, and strong profanity. It also removes a lemma when the senses that qualified it are sexual assault or an explicit sexual role or gathering. Every bundled lemma was checked against its WordNet gloss. The English list from LDNOOBW was used only as a checklist and is not part of the bundle: that list is CC BY 4.0, many of its entries are ordinary words this page still draws, and it missed slurs the review took out. The exclusion list is not a complete content filter. Words about conflict, religion, and the body can still appear, and so can clinical or descriptive sexual vocabulary such as sex, nude, prostitution, and brothel. A lemma stays when an ordinary sense supplies the tags that qualified it, even if WordNet also records a slur, an insult, or a sexual sense. That is why a digging tool, a flower, a verb for a small bite, a color adjective, and a geographic adjective remain. The string colored remains because one heavily tagged sense means having color; another tagged sense is a racial adjective many readers find offensive, and the review does not split a lemma by sense. Country names and the ordinary names of peoples remain. Mild religious intensifiers remain. The exclusion sits outside the random draw. WordNet 3.0 Copyright 2006 by Princeton University. All rights reserved. The database may be copied and distributed for any purpose without a fee, provided this notice and the disclaimer stay with the copy. The database is provided as is. Princeton University makes no warranty of merchantability or fitness for a particular purpose, and no warranty that use of the database will not infringe third-party rights. The name of Princeton University may not be used in advertising a distribution of the database. The full license is linked under Sources and stored beside the list in the site repository.
Secret Santa
The Secret Santa draw is a derangement: a pairing in which nobody draws their own name. Exclusions remove both directions of a pair, the usual rule for a couple. For a list of up to 12 people the page counts every valid pairing and picks one with crypto.getRandomValues, so each valid pairing is equally likely. Longer lists, up to 40 names, try random permutations from the same generator and accept the first one that is a valid pairing. If those misses leave a possible pairing unfound, a complete search still returns one, or reports that none exists. That fallback does not claim every remaining pairing is equally likely. It does claim that a possible draw is not described as impossible. Impossible lists are refused with a reason. The result is not a seed. Each person's link encodes only their own recipient in the URL fragment. The fragment is not encryption. Anyone with the link can read it, and the browser does not send the fragment with the request for the page.
Out of scope
Do not use these draws for lottery picks, gambling systems, sports betting, or cryptographic keys and seeds. The tools are entertainment and education. A strong PRNG in a web page is still a web page: extensions, shared computers, and screenshots exist. Generate secrets in a password manager or a dedicated tool, not in a spinner.
Sources
Related
Questions
Is the generator cryptographically strong?
The bytes come from crypto.getRandomValues, which the Web Crypto specification requires to be a cryptographically strong pseudorandom source. ChanceKit then maps them with rejection sampling. That is a statement about the API we call, not a third-party audit of your device, and not a claim that the page is a hardware RNG.
Can I reproduce a result from a seed?
Not for the coin, the dice, the wheel, the number, the word, or the letter. There is no seed box on those pages, and opening their link does not replay the draw. The Secret Santa page is narrower: each person's link encodes that one assignment in the fragment so they can open it later. That is the assignment itself, not a seed that runs the draw again, and it is not encryption. Anyone who has the link can read the one name it holds. Reproducible streams are useful in simulations and easy to misuse as 'provably fair' gambling theater. If we add seeds later, they will be documented as optional and off by default.
Does the server see the outcome?
The draw runs in the page. ChanceKit does not operate an account system that stores flips. A hosting provider still sees ordinary web requests for the HTML and assets, the same as any site. The result itself is computed after the page is in your browser. A Secret Santa link keeps the assignment in the fragment after #, which is not part of that request. Analytics on this site are set up to omit the fragment as well.
How fair is a random word or a random letter?
A letter is uniform over the set you selected: 26, 5, or 21 outcomes, or a random subset when repeats are off. A word is uniform over the lemmas that match the part of speech, category, and length. Both use the same Web Crypto draw and the same rejection sampling as the coin. Neither one is weighted toward common English, and neither one is atmospheric noise. The word list is a filtered dictionary, so the fairness claim is about that list, not about the frequency of words in a novel.
Why can a short session look unbalanced?
Because fair draws clump. Three heads is 1 in 8. A missing 100 in twenty tries of 1-100 is normal. The tools do not insert corrective results to make a demo look tidy. If a lesson needs a large sample, generate more numbers and tally them.
Last updated