Visualize
code execution

for Python, Java, C, C++, and JavaScript

Start Visualizing
25+ million users since 2010
500+ million visualizations
180+ countries
10,000+ schools using it

Learn Programming Visually

Python Tutor is the only tool that lets you write code in a web browser and see what happens step-by-step as the computer runs it. It visualizes variables, objects, pointers, data structures, and stack frames. These visuals help students to debug their homework, teachers to explain concepts, and programmers to prepare for job interviews.

Despite its historical name, Python Tutor visualizes Python, Java, C, C++, and JavaScript, which are the most popular languages in both schools and workplaces. Since 2010 it has been used by over 25 million people from over 180 countries and in computer science (CS) classes at thousands of universities including MIT, Harvard, Princeton, UC Berkeley, Tsinghua, and the IITs.

Try it out
Python code showing recursive listSum function Visualization showing stack frames and tuple objects

Impact

Python Tutor is an online compiler and visual debugger for Python, Java, C, C++, and JavaScript. Since 2010 over 25 million people in more than 180 countries have used it to visualize over 500 million pieces of code, making it the most widely-used visualization tool for CS education. The live map above shows 10,000 to 20,000 people using it daily right now.

Students: Ace Your Classes

  • Deeply understand code by forming an accurate mental model of how it executes
  • Fix bugs in your homework and class projects
  • Visualize content from introductory programming and DSA (Data Structures & Algorithms) tutorials
Start visualizing now

Teachers: Engage Your Students

  • Do live coding in front of your class and walk through step-by-step visualizations
  • Have students guess what happens at each step and do other active learning
  • Create engaging lessons based on interactive visualizations
Free teacher mode

Programmers: Get That Job!

  • Prepare for technical interviews by building a strong mental model of code execution
  • Visualize DSA (Data Structures & Algorithms) concepts that interviewers ask about
  • Learn a new programming language by analogy to ones you already know
Start visualizing now