Skip to content
[/craft]

Roll A Random Number 1–100

Generate a random number between 1 and 100

✅ Verified for Java 26.2 · Bedrock 26.32 — checked June 2026

Rolls 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..100
19 characters

How to use

  1. Open chat (T on Java, / on Bedrock).
  2. Paste the command and press Enter.
  3. A random number 1–100 appears in chat.
  4. 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"}}

Deal a set amount of damage with a command

/damage @s 6 minecraft:magic

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

Switch yourself into Creative mode

/gamemode creative

Instantly remove every mob from the world except players

/kill @e[type=!player]