JS object to JSON
Turn a JavaScript object literal — unquoted keys, single quotes, trailing commas — into strict JSON.
How to use
- Paste a JS object literal.
- Convert.
- Copy the JSON.
What it supports
Parses object/array literals with single or double quotes, template-free strings, trailing commas, comments, and number literals (hex, binary, octal, exponents, Infinity, NaN→null). Functions, variables, and spread syntax are not supported. Input up to 1 MB.