← All text tools

JavaScript Runtime Visualizer

Step through a short script and watch the call stack, microtask queue, task queue, console and closure scopes change, to learn the event loop and promises.

  • Free
  • No sign-up
  • Works on any device

About JavaScript Runtime Visualizer

Output order in JavaScript is often a surprise: a promise callback runs before a timer set earlier, and code after await waits for the microtask queue. This page runs your short script in a small interpreter and lets you step through it. You see the call stack, the microtask queue, the task queue of timers, the console output, and the variables in each scope, with closures that stay alive after their function returned. Example: console.log, setTimeout 0 and a resolved promise print in the order start, end, microtask, timeout.

How to use JavaScript Runtime Visualizer

  1. Pick an example or type a script with functions, promises, timers or async functions.
  2. Press Next step, or Play, and watch the stack and the queues change.
  3. Press Run to end to jump to the last step and read the console order line.

Why use this tool?

Also known as

Frequently asked questions

Why does a promise callback run before setTimeout with 0?

Promise callbacks go to the microtask queue, which the event loop empties completely after the current script, before it takes the next task. setTimeout callbacks wait in the task queue.

Which JavaScript features does the visualizer support?

let, const and var, functions and arrow functions, closures, arrays and objects, loops, try and catch, console.log, setTimeout, queueMicrotask, Promise and async and await. Classes, destructuring, spread and setInterval are not supported.

Is my script sent anywhere or run by the browser's own engine?

Neither. The script is read and run by a small interpreter written for this page, entirely on your device, and it stops after a fixed number of operations so endless loops cannot freeze the tab.

Is JavaScript Runtime Visualizer free?

Yes. JavaScript Runtime Visualizer on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.