Skip to content
Visualize Python, Java, JavaScript, TypeScript, Ruby, C, and C++ code execution in your Web browser
C JavaScript Roff HTML C++ Java Other
Branch: master
Clone or download

Latest commit

Latest commit 480896e May 24, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
tests/frontend-regression-tests added render-trace.html and tests/frontend-tests/ into v5-unity/ Jun 10, 2018
v1-v2 minor cleanup Dec 16, 2014
v3 Update Nov 11, 2019
v4-cokapi added a known bug to tests/no-prototype-object.js Feb 11, 2020
v5-unity comment May 24, 2020
.gitignore tiny Jun 13, 2018
.gitmodules removed java_jail submodule Feb 11, 2015
LICENSE.txt updated toplevel docs Jun 9, 2016 Update Nov 11, 2019
board.jpg added Oct 19, 2019
history.txt small Feb 17, 2020 Update May 19, 2020 Update Feb 8, 2020

Python Tutor -- -- helps people overcome a fundamental barrier to learning programming: understanding what happens as the computer executes each line of a program's source code. Using this tool, you can write Python, Java, JavaScript, TypeScript, Ruby, C, and C++ programs in your Web browser and visualize what the computer is doing step-by-step as it executes those programs.

This tool was created by Philip Guo in January 2010. See project history.

List of unsupported features and known bugs

The latest development version of the code is in v5-unity, although lots of legacy documentation still resides in v3.

Quick Start

BY FAR the most preferred way to use Python Tutor is via the official website, since it contains the latest updates:

You can use iframe embedding to easily embed visualizations on your webpage.

If you want to run locally on your own computer, to run Python visualizations try:

pip install bottle # make sure the bottle webserver ( is installed
cd OnlinePythonTutor/v5-unity/

You should see the visualizer at: http://localhost:8003/visualize.html

... and the live programming environment at: http://localhost:8003/live.html

However, it can be hard to run your own visualizer locally for non-Python languages, since there are complex dependencies in v4-cokapi/ that I haven't yet cleanly packaged up. By default, the local version you run will call my own server to run the non-Python backends, so please be mindful of your bandwidth usage.

Note: I can't provide technical support for users who want to install Python Tutor on their own computers/servers (read details here).

For further directions, see Overview for Developers or explore the rest of the docs.


For code or security contributions:

  • Irene Chen - experimental holistic visualization mode - v3/js/holistic.js
  • John DeNero - helping with the official Python 3 port, bug fixes galore
  • Mark Liffiton - localStorage bug fix
  • Chris Meyers - custom visualizations such as v3/ and v3/
  • Brad Miller - adding pop-up question dialogs to visualizations, other bug fixes
  • David Pritchard and Will Gwozdz - Java visualizer and other frontend enhancements
  • Peter Robinson - v3/
  • Peter Wentworth and his students - working on the original Python 3 fork circa 2010-2011
  • Security tips and vulnerability reports: Aaron E. (, Chris Horne (, Joshua Landau (, David Wyde (

For user testing and feedback from instructors' perspectives:

  • Ned Batchelder
  • Jennifer Campbell
  • John Dalbey
  • John DeNero
  • Fredo Durand
  • Michael Ernst
  • David Evans
  • Paul Gries
  • Mark Guzdial
  • Adam Hartz
  • Sean Lip
  • Fernando Perez
  • Tomas Lozano-Perez
  • Bertram Ludaescher
  • Brad Miller
  • Rob Miller
  • Peter Norvig
  • Andrew Petersen
  • David Pritchard
  • Suzanne Rivoire
  • Guido van Rossum
  • Peter Wentworth
  • David Wilkins

... and many, many more!

You can’t perform that action at this time.