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.

All tools

Coercion Visualizer

Watch == vs === coercion play out step by step

5 of 5 free uses left

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

javascript type coercionjs type coercion visualizerjavascript == vs === operatorloose equality vs strict equalityjavascript equality visualizerjs equality operator explainedjavascript double equals vs triple equals== vs === javascript examplejavascript coercion stepstoprimitive javascripttonumber javascript coerciontostring javascript coerciontoboolean javascriptjavascript abstract equalityabstract equality comparisonstrict equality comparison javascriptwhy is empty array == false true in javascriptjavascript empty array equals not empty arraynull == undefined javascript0 == false javascript'' == false javascriptnan === nan falsejavascript weird equality examplesjs coercion tablejavascript type conversion tableimplicit type conversion javascriptexplicit type conversion javascriptjavascript equality quirksjs equality interview questionsjavascript interview coercion questionsunderstand javascript coercionlearn js type coercionjavascript coercion playgroundtest javascript equality onlinejavascript equality tester== vs === performanceshould i use == or === in javascriptwhen to use loose equality javascriptjavascript object is vs ===object.is vs strict equalityjavascript NaN comparisoncompare values javascript tooljs equality step by stepvisualize javascript equalityjavascript type coercion examplesjavascript truthy falsy valuesfalsy values javascript listjavascript coercion rulesecmascript toprimitive explainedjavascript valueof tostring coerciondouble equals javascript explained

More tools

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

View all 10+ tools →