JS Object Literal to JSON
Turn a JavaScript object or array literal into JSON with source-order keys and full numeric text, without evaluating code.
js-object-to-jsonLOCAL WORKSPACE
Enabling local controls…
If clipboard access is denied, select the read-only output manually. Input HTML, SVG, CSS and JavaScript are never rendered or executed.
How to use this tool
Paste one literal or open a UTF-8 JavaScript file. Review any source line and column error, then copy or save the corrected JSON.
When not to use it
Dynamic expressions, duplicate keys and values without a JSON representation are rejected. Some downstream parsers round large numbers.
Read the guide →