Firework Command Generator
BetaPick a shape and colours for each explosion, set how high it flies, and watch the rocket launch in the preview. Copy a /give for a stack of rockets, or a /summon that fires one right away.
Describe it — AI writes the command
Type what you want in plain words. The AI fills the form below, so you can see it and change anything. It follows the edition and version you picked.
Checking the AI…
Paste a command— edit it here or move it to another version
Your command · Java 26.3
222 characters/give @p minecraft:firework_rocket[fireworks={flight_duration:2,explosions:[{shape:"large_ball",colors:[I;11743532,15435844],fade_colors:[I;14602026],has_trail:true},{shape:"star",colors:[I;6719955],has_twinkle:true}]}] 16
Raw editor
How it works
A rocket holds a flight duration (1 to 3, the gunpowder in the recipe) and a list of explosions. Each explosion has a shape, one or more colours, optional fade colours, a trail and a twinkle. The game stores colours as numbers, so the generator converts dye colours for you.
Java 1.13 to 1.20.4: NBT
give @p minecraft:firework_rocket{Fireworks:{Flight:2b,Explosions:[{Type:1b,Colors:[I;11743532],FadeColors:[I;14602026],Trail:1b}]}} 16Type is a number: 0 small ball, 1 large ball, 2 star, 3 creeper, 4 burst. Flicker is the twinkle.
Java 1.20.5 and later: the fireworks component
give @p minecraft:firework_rocket[fireworks={flight_duration:2,explosions:[{shape:"large_ball",colors:[I;11743532],fade_colors:[I;14602026],has_trail:true}]}] 16Launching one with /summon
A summoned rocket needs a fuse. Without LifeTime it bursts on the spot, so the generator sets one that matches the flight duration. The rocket item goes inside the entity:
summon minecraft:firework_rocket ~ ~1 ~ {LifeTime:35,FireworksItem:{id:"minecraft:firework_rocket",count:1,components:{"minecraft:fireworks":{flight_duration:2,explosions:[{shape:"star",colors:[I;6719955]}]}}}}Before 1.20.5 the item inside uses Count:1b and tag:{Fireworks:{…}} instead.
Bedrock
Bedrock commands can’t carry firework data. give @p firework_rocket 16 gives plain rockets (fine for elytra boosts), and summon fireworks_rocket ~ ~ ~ launches one that fizzles out. For coloured bursts, craft the rockets with firework stars.
FAQ
How do I make a firework that explodes right away?
Use the summon option. It writes a /summon with a LifeTime (the fuse in ticks). Lower it for an earlier burst, raise it for a higher one. Put it in a command block with a clock for a show.
What colour numbers does Minecraft use for fireworks?
Each dye has its own firework colour, stored as one number (red is 11743532, light blue 6719955). On Java you can also use any colour: the number is just the RGB value, so #FF0000 is 16711680. The generator does the conversion.
What do trail and twinkle do?
Trail (a diamond in the recipe) leaves sparks behind each particle. Twinkle (glowstone dust) makes the particles crackle and flash after the burst.
Why does my firework command fail in 1.21?
Since Java 1.20.5 item data uses components in square brackets: firework_rocket[fireworks={…}] with shape names instead of Type numbers. Commands written for 1.20.4 and older don't work any more. Pick your version and copy again.
Can I make custom fireworks with commands on Bedrock?
No. Bedrock's /give and /summon have no NBT, so explosions can't be set. Craft firework stars with dyes, gunpowder and extras, then combine them with paper and gunpowder.