Coercion Visualizer - Free Online JavaScript Equality Tool | IconVault
Watch JavaScript == vs === coercion play out step by step with ToPrimitive and ToNumber traces. Free, runs fully in your browser.
Coercion Visualizer
Watch == vs === coercion play out step by step
Type any JS literal: numbers (0x10, 1e3, -0, NaN, Infinity), quoted strings, true, false, null, undefined, arrays and objects.
[] == ![]
true=== on the originals says false. Coercion changed the answer.
Step 1 of 5: Start
[] == false
Left is Array, right is Boolean.
5 of 5 free analyses left. Stepping through a walkthrough is always free.
All steps
Gotcha gallery: click one to walk through it
Simplified model
This follows the real Abstract Equality algorithm for the everyday cases: null, undefined, booleans, numbers, strings, arrays and plain objects. BigInt, Symbol and exotic ToPrimitive overrides are left out. When in doubt, write === and convert explicitly with Number() or String().
About this tool
IconVault's Coercion Visualizer demystifies the weirdest corner of JavaScript: type coercion. Type two values and watch the engine evaluate loose equality (==) one rule at a time, showing each ToPrimitive, ToNumber, ToString and ToBoolean conversion in order, right next to the result of strict equality (===) for comparison.
It is the fastest way to understand why `[] == "0"` is true while `[] === "0"` is false, or why `null == undefined` passes but `null == 0` does not. Every step follows the actual ECMAScript abstract operations, everything runs fully in your browser with nothing uploaded, and it is free to try (heavy repeated use may ask for Pro).
Frequently asked questions
Popular searches
More tools
Code Playground
Write HTML, CSS & JS with live preview.
JSON Formatter
Beautify, validate & minify JSON.
Base64 Encoder
Encode & decode text and files.
JWT Decoder
Inspect tokens without sending them anywhere.
Coming soon
CLI
Coming soon
Figma plugin
Coming soon
VS Code extension
Coming soon
Chrome extension
Coming soon
AI icon generator
Coming soon
Team workspaces
Coming soon