Learn Computer Academy

Call Stack + Event Loop Visualizer

Real JavaScript, really run — watch the call stack, Web APIs, and microtask queue live as your own code (or a preset) actually executes, with a plain-English narration for every step.

Browse JavaScript lessons

This runs your real code in a sandboxed iframe with real setTimeout/Promise scheduling — the order and timing you see is genuinely how the engine ran it, not a made-up animation. Only the "waiting in a queue" boxes are illustrative: JavaScript itself can’t inspect what’s sitting in the browser’s internal queues, only when things start and stop running, which is exactly what’s traced here.

Code

Preset

How this works

There is no JavaScript API that exposes the engine’s real call stack or task queues, so a tool like this can’t "measure" them the way a layout tool measures pixels. What it does instead — the same approach every real event-loop visualizer uses — is run your actual code with real setTimeout and Promise scheduling inside a sandboxed iframe, and read the real call stack via new Error().stack at each traced moment. The ordering and timing you see is genuinely how the browser executed your code, not invented. Long setTimeout delays are capped at 3 seconds so a teaching example doesn’t make you wait; relative order is preserved for any delay under that cap.