Coin Flipper

H
T

Related Tools

0 comments

How it works

Each coin is decided by one byte from crypto.getRandomValues — the browser's cryptographically secure random source. Odd byte = heads, even = tails. The result is then animated with a CSS 3D rotateY keyframe, landing on the correct face. On mobile, shaking your device triggers a flip via the DeviceMotion API. Streak and history track across flips for the session. No data is sent anywhere.

Common use cases

  • Settle a decision fairly with a verifiably random, bias-free digital coin.
  • Run multi-coin flips for drinking games or party activities without a physical coin.
  • Check intuition about randomness: flip 100 coins and watch the streak counter.

Frequently asked questions

Is this truly random?

Yes — crypto.getRandomValues pulls from the OS entropy pool, the same source used by HTTPS and password managers. Each coin flip is one byte; parity (odd/even) determines heads or tails, giving exactly 50/50.

How does shake-to-flip work?

On supported mobile browsers, the DeviceMotion API detects acceleration above a threshold and triggers a flip. iOS may ask for motion sensor permission on first use.

Is the 50/50 split guaranteed per session?

No — 50/50 is the long-run probability per flip. Short runs can deviate; the streak tracker shows exactly how the session is running.

Is my flip history saved?

History is session-only and cleared when you close or refresh the tab. The Reset button clears it manually.