Roll A Random Number 1–100
Generate a random number between 1 and 100
✅ Verified for Java 26.2 · Bedrock 26.32 — checked June 2026Rolls a random number between 1 and 100, useful for games, random events, or probability-based redstone. The output appears in chat and can be read by command blocks via /execute store.
/random roll 1..10019 characters
- Java: yes
- Bedrock: no
- Command block: yes
- Needs cheats / OP: yes
How to use
- Open chat (T on Java, / on Bedrock).
- Paste the command and press Enter.
- A random number 1–100 appears in chat.
- Adjust the range (e.g., 1..20) as needed.
Related commands
Make chat text a clickable button that runs a command
/tellraw @a {text:"[Click to teleport to spawn]",color:green,click_event:{action:run_command,command:"/spawn"}}Mount the closest horse with a command
/ride @s mount @e[type=horse,limit=1,sort=nearest]Become nearly invincible
/effect give @p resistance 999999 255 true