도구 가이드
generators 무료 회원가입 불필요

무작위 생성기(주사위, 동전, 카드)

주사위 굴리기, 동전 던지기, 무작위 카드 뽑기, 무작위 숫자 생성 — 모두 암호학적으로 무작위.

도구를 불러오는 중…

이 도구에 대해

게임, 결정, 시뮬레이션을 위한 진정한 무작위 결과를 생성하세요. 여러 주사위(d4, d6, d8, d10, d12, d20, d100) 굴리기, 여러 동전 던지기, 섞인 덱에서 무작위 플레이 카드 뽑기, 또는 임의의 범위에서 무작위 숫자 생성. 모든 무작위성은 WebCrypto API를 사용합니다.

사용 방법

  1. 1 탭을 선택하세요: 주사위, 동전, 카드 또는 숫자.
  2. 2 굴리기 설정을 구성하세요.
  3. 3 '굴리기/던지기/뽑기'를 클릭하여 생성하세요.
  4. 4 최근 굴리기 기록과 함께 결과가 표시됩니다.

What "truly random" means here

There are two grades of randomness in software. The everyday kind, produced by Math.random(), is a fast pseudo-random sequence that is fine for shuffling a playlist but is technically predictable if you know its internal state. The stronger kind comes from the browser's WebCrypto API via crypto.getRandomValues(), which draws from the operating system's cryptographic entropy pool — the same source used to generate encryption keys. This generator uses the cryptographic source for every dice roll, coin flip, card draw, and number, so each outcome is genuinely unpredictable rather than merely hard to anticipate.

How a fair roll avoids hidden bias

Getting an unbiased number in a range is subtler than it looks. The naive approach — take a random 32-bit integer and apply value % 6 for a die — quietly favours some faces. Because 2³² is not evenly divisible by 6, the lowest few results occur slightly more often than the highest. This is called modulo bias, and over thousands of rolls it skews the distribution.

This tool removes the bias with rejection sampling. It requests a fresh random 32-bit value and, if that value falls in the small "leftover" zone that would cause an uneven split, it throws it away and draws again. Only values from the evenly divisible portion are accepted. The cost is occasionally asking for one extra random number; the benefit is a die, coin, or range that is mathematically fair, not approximately fair.

Four generators in one

TabWhat it producesRange per item
Dice1–100 dice of d4, d6, d8, d10, d12, d20, or d1001 to the number of sides
Coins1–100 coin flips, reported as Heads/Tails2 outcomes
CardsDraws from one shuffled 52-card deckcards removed until reset
NumberIntegers in any min–max range, with optional no-duplicatesmin to max inclusive

The card deck is the one stateful generator. When you load the page or press New Deck, all 52 cards are built and shuffled with a Fisher–Yates pass driven by the same cryptographic source. Each draw removes cards from the deck, so you will never see the same card twice until you reset — exactly like dealing from a real shuffled deck.

A worked example: rolling 2d6

Set the dice tab to a count of 2 and 6 sides, then roll. Each die independently lands on 1–6, and the tool also reports the sum and the average. The two-dice sum is a classic example of why this matters: a total of 7 can be made six ways (1+6, 2+5, 3+4, 4+3, 5+2, 6+1) while a total of 2 can be made only one way (1+1). So even with perfectly fair dice, sums near 7 appear far more often than sums near 2 or 12. The fairness here applies to each individual die; the bell-shaped distribution of the sum is the mathematics of adding them, not a flaw.

The "no duplicates" option for number draws

In the Number tab, ticking No duplicates changes the algorithm entirely. Instead of drawing each value independently (where repeats are possible), it builds the full list of integers from min to max, shuffles it, and slices off as many as you asked for. This guarantees every result is distinct — perfect for a raffle where one ticket cannot win twice, or for picking unique table assignments. If you request more unique numbers than the range can supply (say, 10 unique values from 1–5), the tool refuses with an error rather than looping forever.

Practical use cases

  • Tabletop and role-playing games when you do not have physical dice — d20 systems and percentile (d100) rolls are both supported.
  • Fair decisions and tie-breakers: flip a coin, or generate one number in a range to pick a winner without anyone questioning the result.
  • Raffles and giveaways: use a unique number draw across your ticket range so each number can only be selected once.
  • Teaching probability: flip 100 coins at once and watch the heads count cluster near 50, demonstrating the law of large numbers in a single click.
  • Sampling and shuffling: draw cards to randomise an order, or pull random numbers to select rows from a dataset.

Common mistakes

  • Expecting "even" results. Fair randomness does not mean alternating or balanced — flipping ten heads in a row is unlikely but entirely possible. Each flip is independent of the last.
  • Forgetting the deck depletes. If draws stop appearing, the 52-card deck is empty; press New Deck to reshuffle.
  • Using it for security. While the underlying source is cryptographic, this is a convenience tool. For passwords or keys, use a dedicated generator.

Privacy

All randomness is generated locally in your browser through the WebCrypto API. No roll, flip, draw, or number is ever sent to a server — the results exist only on your device, and the tool works fully offline.

자주 묻는 질문

{# Alpine.js — self-hosted. (The previous jsdelivr CDN tag had a stale SRI integrity hash, so the browser refused to run it and window.Alpine was never defined — silently breaking every FAQ accordion and Alpine tool.) #}