Best Free Hour of Code Lessons and Activities

Female student creates HTML code on laptop computer
(Image credit: Getty Images/SolStock)
Recent updates

This article was updated November 29, 2023.

The Hour of Code takes place every year during Computer Science Education Week, which occurs this year December 4-10. It’s designed to get kids excited about coding via brief, enjoyable lessons, typically based on digital games and apps. However, you can also teach coding, STEM, and computer logic with “unplugged” analog lessons, some of which are listed here. We’ve also included free coding curricula for students working at an advanced level. 

Most of the following free Hour of Code lessons and activities do not require an account or login. All are easy to access and can enrich your classroom’s computer science and coding curriculum all year round. 

Best Free Hour of Code Lessons and Activities

Tinkercad Codeblocks
Block-based coding is a great start for aspiring coders of any age. First create a free account, then explore tutorials on shapes, 3D movement, templates, and much more. Once students have gained some experience, they can try remixing template code, or even create their own.

Free Unplugged Lessons  
Sometimes “unplugged” is the best way to teach and learn about coding. These five beginner-friendly free lessons are engaging and educational, helping users learn the principles of artificial intelligence and machine learning. No account is required, but you will need to enter an email address to receive the activities, which are available as Google Slides and PDF printables. 

Code Your Way Out! Digital escape room
Add coding to the digital escape room format, and the excitement is greatly heightened. This escape room puzzle invites students to use logic, reason, and computer coding to break the firewall which is preventing the entire school from going online. Great fun. 

Khan Academy: Hour of Code
Khan Academy’s interactive videos, challenges, and projects make it easy to dive into STEM teaching and learning coding. The clean, easy-to-navigate interface provides step-by-step guidance and resources for coding drawings, webpages, databases, and more. Create a free account to save resources and document your progress. Not sure where to begin? Consult the teachers’ guides, which cover programming with JavaScript, HTML, CSS, SQL, and more. Integrates with Google Classroom.  

Hour of Code with CodeHS
Ranging from beginner level through advanced, these hour-long tutorials include detailed lesson plans and solutions for teachers as well as clear video instructions for students. If you’d like to go further, check out the extensive free computer science curriculum here.  

The Tech Interactive: Computational Thinking
Computational thinking is not just for coding. Learn how the four elements of computational thinking—decomposition, pattern recognition, abstraction, and algorithms—can be applied not only to coding, but also to problem-solving across the curriculum. Then check out the CT K12 lessons and activities here

AI for Oceans  
Artificial intelligence needs a great deal of input from humans in order to recognize objects. With this simple and fun AI activity, users will train AI to distinguish trash from treasure (that is, fish). Given the real-world problem of non-biodegradable trash in the ocean, this charming interactive points to a real-world solution. 

Dr. Seuss’ The Grinch Coding Lessons
Twenty coding lessons of increasing difficulty feature the Grinch and scenes from the beloved book. 

Hour of Code Activities
From the innovative nonprofit, this wealth of Hour of Code lessons and activities is probably the single most useful source online. Each activity is accompanied by a teacher’s guide and includes unplugged activities, lesson plans, extended project ideas, and featured student creations. For an overview of Hour of Code in the classroom, read the how-to guide first. Not sure how to teach computer science without the computer? Check out’s complete guide to unplugged coding, Computer Science Fundamentals: Unplugged Lessons

Code Combat Game
Focused on Python and javascript, CodeCombat is a standards-aligned computer science program offering free Hour of Code activities that are ideal for kids who love gaming. Activities range from beginner through advanced, so everyone can get involved. 

Hour of Code: Simple Encryption
Previously the domain of militaries and spies, encryption is now an important part of modern life for anyone who uses a digital device. This simple encryption puzzle starts at the lowest level and builds in complexity. Fun and educational. 

Free Python Tutorial Dice Game
Intended for learners age 11+ who already have a basic knowledge of Python, this complete coding tutorial concludes with a fun dice game that all ages can enjoy.  

Simple Scratch Tutorial for Kids: Code a Rocket Landing Game
Great introduction to coding with the block programming language Scratch. 

Supporting Students with Special Needs  
Ideas for teaching coding to students with autism, ADHD, and sensory impairments. 

Intro to App Lab  
Create your own apps with App Lab’s tools and guidance.

Building a Star Wars Galaxy With Code  
Kids drag and drop blocks to learn JavaScript and many other programming languages. Start with the explanatory videos or go straight to the coding. No account needed. 

Computer Science Field Guide
This free programming resource for high school students includes a teacher’s guide, curriculum guides, and interactive lessons. Originally developed for New Zealand schools, but now adapted for worldwide use.  

For the advanced learner, this site provides more than 6,000 free courses and tutorials that award credit upon completion.  

Girls Who Code
Free JavaScript, HTML, CSS, Python, Scratch, and other programming lessons that students, parents, and educators can complete at home. 

Google for Education: Hands-on activities with instructional videos
One-hour activities that use coding to transform ordinary aspects of curriculum into computer science learning.  

Tynker: Hour of Code for Teachers  
Text- and block-based coding puzzles, searchable by elementary, middle, and high school level. 

Hour of Code with Kodable
Free Hour of Code games, lessons, and worksheets. Create a teacher’s account to track student progress. 

MIT App Inventor
Users create their own mobile app with a blocks-based programming language. Need help? Try the Hour of Code Teacher’s guide

Microsoft Make Code: Hands-on computing education
Fun projects utilizing both block and text editors for students of all ages. No account needed. 

Scratch: Get Creative with Coding
No account needed to start coding new worlds, cartoons, or flying animals.

Scratch Jr
Nine activities introduce kids to coding with the programming language Scratch Jr., which lets children aged 5-7 create interactive stories and games. 

Diana Restifo

Diana has been Tech & Learning's web editor and contributor since 2010, dedicated to ferreting out the best free tech tools for teachers.