Developer Tools
Zero Friction
Format JSON, decode JWTs, convert curl, and step through JavaScript execution — tool logic runs in your browser.
More Tools
Colors, text, encoding & more
Why StackTools
Local processing
Formatters and decoders run in the page. Paste sensitive samples with less worry about uploading them.
No account wall
Open a tool, paste input, copy output. Guides sit next to the matching utility.
Dark mode
Default dark theme for long sessions; switch to light anytime.
See how JavaScript actually runs
The visualizer is built for a specific question: in what order do these logs print? Here is the default demo and the order a browser will print.
console.log("Start");
setTimeout(() => {
console.log("Inside setTimeout (0ms)");
}, 0);
Promise.resolve()
.then(() => {
console.log("Inside Promise.then #1");
return Promise.resolve();
})
.then(() => {
console.log("Inside Promise.then #2");
});
console.log("End");Console order
StartthenEnd(synchronous)- Both
Promise.thencallbacks (microtasks drain before timers) setTimeoutcallback (macrotask)
Open the visualizer, click Run, and watch the microtask queue empty before the timer fires.
Open visualizerFAQ
What does the JavaScript Execution Visualizer show?
It steps through a snippet and shows the call stack, scopes, microtask queue (Promise callbacks), and timer/macrotask queue (setTimeout). Use it to predict console output order for interview-style async puzzles.
Why does Promise.then run before setTimeout(0)?
After the current synchronous work finishes, the engine drains the microtask queue completely before taking the next macrotask. Promise reactions are microtasks; setTimeout callbacks are macrotasks — even with a 0 ms delay.
Does tool input leave my browser?
Tool processing (format, decode, convert, visualize) runs client-side. StackTools does not upload your JSON, JWTs, or code snippets to process them. Ads or analytics may still load as described in the privacy policy.
Is the visualizer a full JavaScript engine?
No. It is an educational simulator for common patterns: sync code, Promises, timers, scopes, and hoisting. Prefer a real engine (browser DevTools or Node) for production debugging.
No signup · Read guides