CodeFlip Open the visualizer

See what every line of code does to memory.

Step through a program and watch its variables, objects and pointers change, with one plain sentence per step.

Python, Java, C, C++, JavaScript and TypeScript. Free and open source, with no account and nothing to install.

The moments students get wrong, drawn plainly

Each of these is a real program, paused where it gets confusing. Step back and forward to see what changed, or open it in the visualizer and edit it.

Made to drop into a course

Free to use and embed anywhere, including commercial sites. Here is how it fits into what you already teach with.

Put a visualization in any page

Press Share in the visualizer to get a short link, an iframe, or a web component that sizes itself to the page. A link can open on the step you choose, at the start, or at the last step, where an error shows.

<script type="module" src="https://codeflip.dev/codeflip.js"></script>
<code-flip lang="python" step="4">
scores = [90, 72]
backup = scores
backup.append(85)
</code-flip>

Add it to Canvas

CodeFlip is an LTI 1.3 tool. A Canvas admin installs it once; after that, teachers pick the program an assignment or module item shows, by pasting a CodeFlip or Python Tutor link or choosing an example. Students open it inside Canvas, with no account.

  1. AdminAdds CodeFlip with one registration URL.
  2. TeacherAdds an item and chooses the program.
  3. StudentSteps through it in the course page.

Keep your Python Tutor links

Change the domain and an existing link or iframe opens the same program on the same moment. The migration guide converts links for you, and back again if you ever want to return.

pythontutor.com/iframe-embed.html#code=… codeflip.dev/iframe-embed.html#code=…

Shape what students see

End a line with #break (or // break) and Next stops there. A # pythontutor_hide: i comment keeps loop counters off the diagram. Live mode redraws as you type, and programs can read input and text files.

  • Breakpoints
  • Hidden variables
  • Live mode
  • Program input
  • Text files
  • 2D arrays as grids

How it runs

In the learner's browser
Python, JavaScript and TypeScript run entirely in the page. Java, C and C++ are compiled once on CodeFlip's server and cached, then run in the page: no student's program runs on a server.
Explained for screen readers too
Every step's sentence is announced, stepping works from the keyboard, and nothing relies on colour alone. Motion turns off when the system asks for less.
Open source
The libraries other sites embed are MPL-2.0; the hosted platform is AGPL-3.0. Embedding puts no obligations on your own code.

Coming from Python Tutor?

Python Tutor made this kind of tool part of how programming is taught. CodeFlip keeps its layout and its links, and changes what you can see.

Python TutorCodeFlip
Each step explainedNoA sentence per step, read aloud by screen readers
C and C++ memoryNo return values, no leak or dangling markersReturn values, leaks and dangling pointers, marked and explained
Input and filesInput in Python; no filesInput in every language; text files in Python, Java, C and C++
LanguagesPython, Java, C, C++, JavaScriptThose, plus TypeScript
Live class sessionsTeacher ModeNot yet

The full comparison, and CodeFlip's known limitations

Paste a program and press Visualize.

Open the visualizer