Christmas Coding Books for Kids Who Want to Be Hackers (5-12)
Christmas gift ideas for kids aged 5 to 12 who say they want to be hackers: Scratch game books, Minecraft coding, graphic novels and a first real Python book, sorted by age, with the setup traps parents should know about.
When an eight-year-old says they want to be a hacker, they almost never mean security. They mean they want to make the computer do something nobody told it to do. Good. That is the whole job, minus the paperwork.
So don't buy them a security book. At this age the books that work are the ones that end with a game they built, a robot that mines for them, or a mystery they solved with binary. Security comes later and lands much better on a kid who already knows what a loop is.
None of these books are in the Cyber Shelf catalog, which reviews adult titles. They are the ones we would actually wrap, and for each we flag the thing that tends to go wrong on Boxing Day.
The short version
| Age | Book | What they get out of it |
|---|---|---|
| 5-7 | Hello Ruby | Step-by-step thinking, no screen |
| 7-11 | Coding Games in Scratch (DK) | Finished games they can show off |
| 8-12 | Secret Coders | A mystery that teaches binary and Logo |
| 8-12 | The Friendship Code | A coding-club mystery novel |
| 9+ | Coding with Minecraft | Programmable robots inside Minecraft |
| 10+ | Python for Kids (2nd edition) | A real language, real games |
If you are buying one book for a 9-year-old and don't know where to start: Coding Games in Scratch. If they live in Minecraft, read that section first, because there is a catch.
Ages 5-7: Hello Ruby
Hello Ruby: Adventures in Coding by Linda Liukas is a picture book followed by paper exercises: give instructions to a robot (a parent), find the pattern, repeat a dance move five times. That last one is a loop. They won't know it, and they won't need to yet.
No screen, which is the point at five. Liukas wrote two sequels, Journey Inside the Computer and Expedition to the Internet. The internet one is the closest thing to a security book that makes sense at this age, and an easy way into "what do we share online and with whom".
Ages 7-11: Coding Games in Scratch
Coding Games in Scratch by Jon Woodcock (DK) is the book that gets kids from "I want to make a game" to an actual game in one afternoon. Each chapter is one complete game, laid out across glossy double pages with every block shown, so there is no "now figure out the rest" moment where younger kids give up.
Scratch is free and runs in the browser, so any family laptop works, and kids snap blocks together instead of typing. They spend their time on logic, not on hunting a missing bracket.
One real trap: Scratch changed its interface in 2019 (Scratch 3.0). Older copies of the book show the old one, and a seven-year-old will not translate between them. Check the listing says Scratch 3.0 before you buy. Kids who blow through it can go on to Scratch Programming Playground by Al Sweigart, which is less glossy and asks more of them.
Ages 8-12: Secret Coders
Secret Coders by Gene Luen Yang and Mike Holmes is a six-volume graphic novel series. Hopper starts at a strange new school where even the birds seem wrong, and the only way to find out why is to learn to program. Binary shows up in the first volume, then Logo, a language where you steer a turtle around the screen. The puzzles are in the panels, and the reader is expected to solve them before turning the page.
This is the pick for a kid who doesn't sit still for "learning" books. It doesn't feel like one until about volume three, by which point they're writing loops in their head.
Ages 8-12: The Friendship Code
The Friendship Code by Stacia Deutsch is the first novel in the Girls Who Code fiction series. Lucy joins a coding club expecting to build apps and gets cryptic coded messages instead, which she and three girls she didn't plan on befriending have to work out. The coding is real but light, explained as the club learns it, which is about the right dose for a novel.
It is a story first, which is what makes it work. A good gift alongside Scratch for a kid who reads more than they tinker, and nothing about it stops boys from enjoying it.
Ages 9 and up: Coding with Minecraft
Coding with Minecraft by Al Sweigart (No Starch Press, 2018) is probably the coolest book on this list for a kid who plays Minecraft, which is most of them. It uses the ComputerCraft mod, which adds programmable "turtles": little robots you write code for in Lua. By the end the turtles are chopping trees, farming, building towers and digging mineshafts while the kid watches. Automating the boring parts of a game you love is about as close to the real hacker mindset as it gets.
Now the catch, and it's a big one. The book's setup instructions were written for Minecraft 1.8 with the original ComputerCraft. Current Minecraft versions need the maintained fork, CC: Tweaked, installed through a mod loader like Forge or Fabric, and you need the Java Edition on a computer. Bedrock (consoles, tablets, the Windows Store version) won't run it at all.
Plan for an hour of setup with an adult, before Christmas Day if you can. Once the turtle moves, the Lua in the book mostly carries over. If that sounds like too much, the Scratch book is the safer gift.
Ages 10 and up: Python for Kids
Python for Kids by Jason R. Briggs (No Starch Press, 2nd edition 2022) is the first real, typed programming language. Jokes, short chapters, and by the end two working games built with Python's own graphics tools. Python is also what most security people reach for every day, from quick scripts to full tools, so this is the most direct line from this list to actual hacking skills.
Get the second edition. The first is from 2012, and its setup screens no longer match what kids see.
Sit with them for chapter one. Installing Python, finding the editor and running the first program is where most kids stall, and it has nothing to do with whether they're good at it. After that, most 10 to 12-year-olds go on alone.
If they'd rather read than code
Lauren Ipsum by Carlos Bueno (No Starch Press) is an Alice in Wonderland story set in Userland, where algorithms, cryptography and the travelling salesman problem show up as characters. There is no code in it. It's the gift for the kid who'd take a story over a screen, and the ideas in it tend to click years later in a maths class.
What to tell them about "hacking"
They've heard the word in films and on the news, nearly always meaning a criminal. The framing that works at this age is the toy rule. A hacker is someone who figures out how things really work and makes them do unexpected things. With your own stuff, go wild. With anyone else's, you ask first, exactly like a sibling's toys. Companies even pay hackers to find problems in their systems, but only the ones who asked, and who report what they find instead of using it.
Say it once, early, and keep it boring. Kids who grow up with that rule take it for granted by the time they're old enough to break it.
After this list
Around 12 or 13, the kids who finished these books are ready for the real thing. Our hacking books for teens guide starts there, with free, legal practice sites built for students. For a kid who'd rather crack a cipher than write a loop, try our secret code books for kids.
Frequently asked questions
- What book should I buy for a child who wants to be a hacker?
- Feed the curiosity with coding rather than security books. Hello Ruby for ages 5 to 7, Coding Games in Scratch (DK) or the Secret Coders graphic novels for ages 7 to 12, Coding with Minecraft for kids who live in Minecraft, and Python for Kids from about age 10, which teaches the language many security professionals use every day.
- At what age can a child start learning to code?
- Around 5 with screen-free books like Hello Ruby, which teach step-by-step thinking. Block-based Scratch works well from about 7, and a typed language like Python from about 10.
- How do I explain hacking to a child?
- A hacker is someone who is very good at figuring out how things work. Good hackers ask permission, and companies even pay them to find problems as long as they report them. The rule is simple: your own things yes, other people's things never without asking.
