coin-flipper
An online coin flipper produces a fair 50/50 random outcome β heads or tails β for quick decisions, settling bets, classroom demonstrations of probability, or any occasion when a physical coin is not handy. The ZTools Coin Flipper uses the Web Crypto API for unbiased randomness, supports a single flip with animation, bulk flips up to 10,000 with a heads/tails count and percentage so probability convergence is visible, history of recent flips, and a shareable URL that freezes a single result with a timestamp so disputes are easy to settle.
Use casesβ
Quick personal decisionsβ
"Pizza or pasta?" Flip a coin; commit. Cuts decision fatigue.
Settling friendly betsβ
Two friends disagree on the answer. Loser pays. Share the URL so the result is permanently archived.
Classroom probability demosβ
Flip 1,000 times; plot heads/tails ratio. Watch convergence to 50% β visceral intro to the law of large numbers.
Game-mechanic prototypingβ
Designers test a coin-flip subsystem before coding it β quick statistical sanity check.
How it worksβ
- Pick mode β Single flip (animation + result), or bulk (1β10,000 flips with count and percentage).
- Flip β Crypto-RNG draws a single bit. 0 = tails, 1 = heads. Animation optional.
- Read result β Heads or Tails for single. Bulk shows: heads count, tails count, heads%, longest run, plus a histogram.
- History β Last 100 flips kept locally with timestamp. Filter by today / this week.
- Share β Shareable URL freezes the single result with a server-signed timestamp.
Examplesβ
Input: 1 flip
Output: Heads (with 1.2 sec coin-flip animation)
Input: 1000 flips
Output: Heads: 504 (50.4%), Tails: 496 (49.6%), longest run = 11
Input: 10,000 flips
Output: Heads % typically 49.5β50.5%; convergence visible in the running plot
Frequently asked questionsβ
Is it really 50/50?
Yes β Web Crypto produces unbiased bits. A real coin is actually slightly biased due to physics; the digital flipper is mathematically unbiased.
Can I bias the flip?
Toggle "weighted" mode and set heads probability 0β100%. Useful for game prototyping.
Why does my "1000 flips" not give exactly 500/500?
Variance. Standard deviation for 1000 flips is ~16; getting 500 exactly is rarer than getting 484β516. Bulk mode shows the expected range so you see normal variance.
Does the share link prove the flip was not rigged?
It includes a server-signed timestamp; the result was generated server-side at that moment. For higher-stakes use, consider a hash-chain or commit-reveal scheme.
Can I see the longest streak?
Yes β bulk mode shows longest heads streak and longest tails streak. Surprisingly long streaks are common; intuition usually underestimates.
Is the history saved server-side?
No β local browser storage only. Clear it any time.
Tipsβ
- For high-stakes decisions, use the share link β gives both parties a timestamped record.
- Bulk mode is the best 30-second probability lesson: "see how 1000 flips converge to 50%".
- Beware streak bias β humans intuitively expect heads after a tails run; the math says otherwise.
- For weighted decisions ("70% I should go to the gym"), set probability and let the flip resolve indecision.
- Pair with the Dice Roller when 50/50 is too coarse and you need a 3- or 4-way split.
Try it nowβ
The full coin-flipper runs in your browser at https://ztools.zaions.com/coin-flipper β no signup, no upload, no data leaves your device.
Last updated: 2026-05-05 Β· Author: Ahsan Mahmood Β· Edit this page on GitHub