Minecraft Hour of Code and Hour of AI: Free Coding Lessons
Minecraft Hour of Code is a set of free one-hour coding lessons from Code.org that run in a browser, no game needed. The 2025 Hour of AI, and running one.

Minecraft Hour of Code is a set of free, one-hour coding tutorials set in Minecraft, made by Mojang and Microsoft with the nonprofit Code.org. The classic ones run in any web browser at code.org with no account and no copy of Minecraft needed. Learners drag blocks of code to move a character, solve puzzles and build things. Since 2025 the yearly event is called the Hour of AI, and Minecraft’s lessons now mix in simple AI ideas alongside coding.
The tutorials
Minecraft has been part of Hour of Code since 2015, with a new activity most years. The well-known browser tutorials on Code.org include:
- Minecraft Adventurer (2015): guide Steve or Alex through puzzles using basic commands and loops.
- Minecraft Designer (2016): program how animals and mobs behave to make a small game.
- Minecraft Hero’s Journey (2017): code the Agent through a series of challenges.
- Minecraft Voyage Aquatic (2018): an underwater adventure with more complex logic.
Later activities moved into Minecraft Education itself, where students code with MakeCode inside the real game. Mojang offers each year’s Hour of Code lesson free, and the browser tutorials remain available on Code.org.
Hour of AI 2025
In 2025 Code.org turned Hour of Code into the Hour of AI, which ran December 8 to 14, 2025, during Computer Science Education Week. Minecraft Education’s contribution, The First Night, has players solve coding puzzles to build a shelter before sunset, using some AI concepts along the way. Like earlier lessons, it’s free in Minecraft Education.
The next one will likely appear around Computer Science Education Week in December 2026. Watch minecraft.net and education.minecraft.net for the announcement.
What kids learn
The tutorials teach the core ideas of programming:
- Sequencing: instructions run in order.
- Loops: repeat an action instead of writing it ten times.
- Conditionals: “if there’s lava ahead, turn left.”
- Events: “when the player steps here, do this.”
- Debugging: working out why the program didn’t do what you meant.
Some activities let older students switch to JavaScript or Python, which is a good first look at text code.
Running one in class or at home
- Pick a tutorial on code.org (search for Minecraft) or the current lesson on education.minecraft.net.
- Try it yourself first. It takes 20 minutes and you’ll know where students get stuck.
- Let students work alone or in pairs. Pairs work well: one types, one reads the instructions, then swap.
- Print the completion certificates at the end. Kids genuinely like them.
Teacher guides and answer notes are on the official pages. No license is needed for the browser tutorials, so they work in a computer lab, a library or at home.
What comes after the hour
If a child enjoys it, the natural next step is MakeCode in Minecraft Education, then commands and data packs, then real Java mods. Our page on learning to code with Minecraft lays out that path. Homeschool families can find license options in the homeschool guide, and more on the classroom version is in the education hub.
Common questions
Is Minecraft Hour of Code free?
Yes. The tutorials on Code.org are free and run in a web browser with no account or Minecraft purchase. The yearly lessons inside Minecraft Education are also offered free.
What age is Minecraft Hour of Code for?
Most of the Minecraft tutorials suit ages 6 and up. Younger children may need an adult to read the instructions, and older students can switch some activities to JavaScript or Python.
What is the Hour of AI?
In 2025, Code.org extended Hour of Code into the Hour of AI, held during Computer Science Education Week. Minecraft Education's 2025 lesson, The First Night, has players code a shelter before sunset using some basic AI ideas.
Sources & verification
Facts on this page are checked against these references and in-game behavior for the stated edition(s). how we verify.
Keep reading