Karel is a very good dog with one job: follow your instructions exactly. Millions of students write their first line of code by helping Karel move through a grid world, turn left, and fetch tennis balls.
Karel's world is a simple grid of streets and avenues. Karel can walk forward one square, turn to the left, pick up a tennis ball, and put a tennis ball down. That is Karel's entire vocabulary:
move();Karel walks forward one squareturnLeft();Karel turns 90 degrees to the leftputBall();Karel puts down a tennis balltakeBall();Karel picks up a tennis ballYour job is to write instructions Karel can follow. If your program says move, Karel moves. If it says move into a wall, Karel bonks the wall and tells you something went wrong. Every program you write plays out right in front of you, so you can literally watch your code think.
Here is Karel's secret: the vocabulary is small on purpose. Karel cannot even turn right. The moment a student wants Karel to turn right, they discover the single most important idea in programming: if the command you need does not exist, you can build it, name it, and use it like it was always there.
That is a function. That is abstraction. Students do not learn these ideas because a textbook says they matter. They learn them because Karel genuinely needs them, and that motivation makes the concepts stick.
This is the real CodeHS editor, the same one students use in class. Write a few commands, press Run, and watch Karel go. No account, no install, no leash required.
turnRight() functionKarel is whimsical. The tools around Karel are the real thing: the same editor students keep using through AP Computer Science, with the controls a first-time programmer actually needs turned on.
Drag the slider from turtle to rabbit and Karel runs anywhere between thoughtful slow motion and full zoomies. Slowing down turns a program into a story you can follow line by line.
Advance one command at a time and watch Karel take exactly one step, or step backward to rewind the world. Being able to go back is what lets students hunt a bug instead of restarting.
Click the gutter to set a breakpoint and the program pauses there, with the current line highlighted as Karel moves. Seeing exactly where expectation and reality split is how debugging clicks.
Every revision saves automatically, so students can scrub back through their own history to see how a solution evolved, recover a version that worked, or show their work.
Plain-language error messages that say what Karel tried to do, a built-in documentation tab for every command, and moderated AI hints that nudge toward the fix without handing over the answer.
Works in the browser on any device, Chromebooks included, with nothing to install. Karel speaks JavaScript, Python, and Java, so the same dog can teach whichever language the course needs.
A beginner's first bug is usually invisible: a wrong value in a variable nobody can see. With Karel the bug walks across the screen. The program runs as a sequence of things a dog does, so a mistake is something students watch happen and can point at, and the fix is a change they can predict before pressing Run.
frontIsClear and ballsPresent, loops, and functions add up to a Turing complete language. Anything a computer can compute can be expressed in Karel, so students can genuinely build anything with it, including art.In 1981, Stanford professor Rich Pattis created Karel the Robot, a tiny robot in a grid world named for Karel Čapek, the playwright who gave the world the word "robot," and it became one of the most beloved ways to teach programming ever made.
The founders of CodeHS learned and taught with Karel at Stanford, and when they set out to teach the world to code they brought Karel along in a friendlier shape: a dog who fetches tennis balls instead of beepers. Same grid, same big ideas, significantly more tail wagging.
Free for students and teachers. The full Intro to Programming with Karel course comes with lessons, videos, exercises, and a dog who never gets tired of fetch.