Yes or No Generator
Generate a local 50/50 Yes or No with browser Web Crypto, an optional question, and a transparent 20-entry history.
Privacy: your files never leave your device. All processing happens locally in your browser.
How to use
- 1.Optionally enter a low-stakes question of no more than 1,000 UTF-16 code units.
- 2.Generate a Yes or No using browser Web Crypto and review the current answer.
- 3.Use the newest-first history if useful; clear it when finished and never rely on the tool for high-stakes decisions.
About Yes or No Generator
Yes or No Generator produces a casual binary prompt result entirely in the current browser tab. Enter an optional question or leave it empty, then select Generate Yes or No. The answer is added to a newest-first history so repeated prompts remain visible for comparison. The question, answers, and history are never uploaded to Lizely and are not written to an account or remote service. Random input comes only from Crypto.getRandomValues. The browser fills a one-element Uint32Array, producing an integer from 0 through 4,294,967,295. If Web Crypto is missing, blocked, or throws, the tool reports a clear failure and produces no answer. It deliberately does not fall back to Math.random because silently changing the random source would contradict the displayed methodology and make failure harder to detect. Browser implementations choose their own underlying generator; this tool does not claim access to physical true randomness or expose the generator algorithm. The mapping function supports a general finite outcome count. It calculates the largest multiple of the outcome count that does not exceed the 2^32 source range, accepts values below that limit, rejects values at or above it, and maps accepted values with modulo. Rejection sampling prevents the lower indexes receiving an extra source value when the range does not divide evenly. A bounded 128-draw loop prevents a broken injected or platform source from hanging forever. For Yes and No specifically, two divides 2^32 exactly, so the acceptance limit is the whole Uint32 range and no valid Uint32 value needs rejection. Even values map to Yes and odd values map to No, giving each outcome exactly 2^31 source values. The same tested mapper still contains and verifies the rejection path at a three-outcome boundary rather than claiming a retry occurs during ordinary binary use. Deterministic tests inject specific Uint32 sequences. They cover zero, one, middle values, the maximum even value, maximum Uint32, the last accepted three-outcome value, the first rejected value followed by an accepted value, invalid source numbers, the exact 2^32 outcome-count boundary, and exactly 128 rejected draws before exhaustion. Injection is a test seam only. Normal UI generation always calls browser Web Crypto and never lets the question, history, time, or previous answer influence the next mapping. The optional question may contain at most 1,000 UTF-16 code units. The exact boundary is accepted and one code unit beyond it fails without truncation or generation. Empty text is valid because a question is optional. Editing a question clears the prominently displayed current answer and prior error so an answer associated with older wording is not mislabeled. It does not remove history. Question text is stored locally with the generated entry exactly as entered; trimming is used only to decide whether the history should display the label No question. History keeps at most the newest 20 entries. After the twenty-first generation, the oldest entry is removed. A cumulative message states exactly how many earlier answers have been discarded. This is an intentional bounded UI history, not silent loss. Clearing history resets both the visible entries and discarded count and also removes the current answer. The monotonically increasing local entry identifier prevents duplicate runtime keys and is not random data or a persistent identifier. This generator is a lightweight prompt, not advice or a decision authority. Do not use it for medical, legal, financial, safety-critical, emergency, security, consent, employment, eligibility, compliance, or other high-stakes decisions. Web Crypto quality does not make the question appropriate, validate the available choices, understand consequences, or provide professional judgment. A mathematically balanced answer can still be unsuitable, unlucky, or harmful when used outside casual low-stakes situations. The tool does not learn preferences, weight alternatives, guarantee alternating results, prevent streaks, prove fairness over a small sample, or predict future events. Random sequences naturally can contain repeated Yes or repeated No answers. The recent history is descriptive only and never modifies probability to compensate for a streak. No dependency, network call, account, Clipboard API, file, or ObjectURL is required. The W3C Web Cryptography specification is the primary source for getRandomValues and in-place integer typed-array filling. MDN independently documents browser behavior, and NIST SP 800-90A supplies random-bit generator context. Those sources support the random input mechanism; the rejection mapping is explicitly implemented and independently exercised at deterministic mathematical boundaries.
Methodology & sources
Validate the optional question at an inclusive 1,000 UTF-16 code-unit limit. Obtain one Uint32 at a time only through Crypto.getRandomValues; fail without Math.random fallback when unavailable. For N outcomes, compute floor(2^32/N)×N, reject values at or above that limit, and return accepted value modulo N, with at most 128 draws. For two outcomes the limit equals 2^32, so every valid Uint32 is accepted and even/odd values map to Yes/No equally. Inject uint32 sources only in tests. Keep newest-first history at 20 entries and accumulate the exact number discarded beyond the cap. Question text and history remain local and do not affect probability.
Frequently asked questions
- Does my question change the probability?
- No. The question is only a local label. Each answer maps one fresh Uint32 from Web Crypto, with exactly half of the source values assigned to each outcome.
- What happens if Web Crypto is unavailable?
- Generation fails explicitly and no answer is added. The tool never substitutes Math.random as a hidden fallback.
- Why can the same answer appear several times?
- Independent 50/50 results can naturally form streaks. History does not rebalance or influence later answers.
- Can I use this for an important decision?
- No. It is a casual random prompt, not medical, legal, financial, safety, emergency, security, or professional advice.
Related tools
- Coin FlipFlip a fair virtual coin instantly, powered by a cryptographically secure random generator — no bias, no ads in the way.
- Dice RollerRoll fair virtual d4–d20 (or any custom die) instantly, right in your browser.
- Random Number GeneratorGenerate fair random integers from your chosen inclusive range without sending any values to a server.
- Random Activity GeneratorFind a practical activity for the time and company you have instead of spending that time deciding what to do.
- Bar Chart MakerTurn 2 to 30 label,value rows into a readable bar chart and download the exact preview as SVG.
- Bingo Card GeneratorCreate printable 75-ball bingo cards in one click
Generators guides
View all- How to Generate Random Characters in Python
- How to Create Random Teams From Any Roster
- How to Generate a Random Number in MATLAB
- How to Generate Usernames That Are Unique and Easy to Remember
- How to Generate a Signature Image Online Free
- How to Make the Pie Chart Bigger in Minecraft
- Roll a Dice for Yes or No in One Click
- Flip a Coin Online for Heads or Tails in Seconds