Heads or tails.
Settled in half a second.

Flip a virtual coin one time, ten times, or settle the argument with best-of-five. Real animation, running counts, and a shareable URL for any setup.

Truly 50/50 (no physical bias) Best-of-N tie-breakers Shareable URL
H
T
Press flip
About best-of-N

Best-of-N rounds your count to the next odd number (so 4 becomes 5, 6 becomes 7) and declares whichever side has the majority the winner. The page shows every flip plus the overall result. Use it for tie-breakers where one flip feels too thin.

About this generator

A coin flip is the smallest possible random decision: one bit, two outcomes. There are a hundred coin-flip pages on Google, and most of them are visually fine and statistically lazy — they call Math.random(), threshold at 0.5, animate a coin face, and call it done. That's good enough for a casual flip. It is not good enough for, say, the long-running curiosity question of "is it really 50/50?"

This one is built around the answer being yes, transparently. Every flip pulls a fresh bit from crypto.getRandomValues. The OS-supplied entropy means every flip is independent of every other flip, on this page or anywhere else, with no risk of seeded sequences repeating across reloads. The page exposes the running count and percentage so you can watch the law of large numbers do its work — flip 10 times and you'll often see 7-3 splits; flip 1,000 and you'll be at 49% to 51%; flip 10,000 and you'll be very close to even.

Two features that go beyond "press button, see coin": best-of-N (flip an odd number, take the majority) for actual tie-breakers, and a multi-flip mode that runs up to 1,000 flips at once. The history strip keeps your last 10 sessions so a kid practicing probability can see results across rounds, and the URL preserves the configuration — count and best-of-N flag — so a teacher can post one link and have every student start with the same setup.

The thing this can't replace: a real referee. Pro sports tosses still use a physical coin and a person watching it land, because the integrity case is about being witnessed, not about being random. For everything else — captain selection at pickup, "should I", who pays for coffee — this is faster, fairer, and you can copy the result URL into a group chat as proof. If you have more than two options, the yes/no decider or the wheel spinner are the next steps over.

What people use it for

The coin is the last word in low-stakes decisions. Here's where it tends to land.

Settling small disputes

Last cookie, who drives, what movie. The fastest way to make a decision binding and bias-free, even if both sides are arguing.

Sports captain choices

Pickup games, intramurals, schoolyard. Pick a side, hit flip, accept the result. Best-of-three if anyone calls foul.

Statistics demos

Flip 100 times in front of a class and watch the running percentage swing wildly early, then settle near 50%. The Law of Large Numbers, lived.

Breaking ties

Two front-runners in a vote, two equally good options, two people who both want the window seat. Flip resolves it without anyone having to "win" the argument.

"Should I" questions

The coin doesn't decide for you — but the moment you see the result, you know which side you were quietly hoping for. Flip is the cheapest way to surface that.

Probability practice

Show a kid that two heads in a row is more common than they'd guess (25% odds). Best-of-five for "what's the chance of three in a row" demos.

How it works

Source of randomness

Each flip is one bit drawn from crypto.getRandomValues, the browser's cryptographically secure random source. We pull a 32-bit unsigned int and inspect the lowest bit; over many flips, every bit position is uniformly distributed, so the choice of bit is just convention. Math.random is never called.

Why not just modulo 2?

For a 2-way split, modulo bias doesn't actually exist — 2 divides 2³² evenly. So the rejection-sampling step we use elsewhere is unnecessary here. We mention it because for any other range (a d6, a 1-to-100), modulo would be subtly biased, and the same crypto source plus rejection sampling fixes that.

Best-of-N rounding

If you ask for an even number with best-of-N on, we round up to the next odd (so 4 becomes 5). Best-of-N then tallies heads vs. tails and declares the majority. With odd counts there can be no tie. With even counts and the toggle off, we just show the per-side counts and percentages.

The animation

The coin is a CSS 3D transform — two opposing backface-visibility faces, one for heads and one for tails, rotated on Y. The result is decided by the math first; the animation just lands on the right face. With prefers-reduced-motion, the spin is skipped and the coin snaps to the chosen side immediately.

State & sharing

Flip count and best-of-N mode are persisted to the URL with history.replaceState. The result of a particular flip is intentionally not in the URL — fairness depends on every flip being a fresh draw, not a replay of someone else's. The last 10 flip events live in localStorage under coin:history.

Drop this coin anywhere.

Stick a flippable coin on a probability lesson page, a "should I?" sidebar, or a quick-decision widget on your blog. One iframe.

Embed docs →
<iframe src="https://randomgen.net/coin/embed/"
  width="100%" height="460"
  loading="lazy"></iframe>

Common questions

Is this coin flip really 50/50?

Yes. We use crypto.getRandomValues to draw a single bit, so heads and tails are exactly equally likely. Real coins are slightly biased — about 51% to land on the side that started up — but the digital version is mathematically fair.

What does best-of-N mode do?

Best-of-N flips an odd number of coins (3, 5, 7…) at once and declares the majority winner. It's how to settle a real dispute without arguing about whether one flip was unfair. The page shows every flip plus the winner.

Why does my count of heads not equal exactly half?

Because random doesn't mean even. After 10 flips you might see 7 heads and 3 tails — that's well within normal variance. After 1,000 flips you should be within a percent or two of 50%, and after 10,000 you'll be very close. The expected variance scales as √N / 2.

Can I flip many coins at once?

Yes. Set the count up to 1,000 in the input, and we'll flip all of them in a batch and show the running counts. Each flip is independent — there's no streak logic, no anti-streak correction, just real coin-flip independence.

Does my history persist?

The last 10 flip events (single flips or batches) are stored in your browser's localStorage. Clearing browser data wipes them. Nothing is sent to a server, ever.

Can I share a specific result?

The flip count and best-of-N mode live in the URL, so you can share a setup. The result of a specific flip isn't preserved in the URL — fairness depends on every flip being a fresh draw, not a replay. If you need a verifiable result, copy the displayed outcome before sending.

Does this work for sports, captain choices, or D&D?

For pickup games and casual decisions, absolutely. For televised pro sports tosses, federations require a physical coin and a referee — the integrity case is about being witnessed, not random. For D&D, just use a d20 — the dice roller is one tab over.