Structured Data
JSON to JavaScript
Paste JSON and get ready-to-use JavaScript — a const, a module export, or a
plain object literal. Choose your quoting, indentation and key style, then copy or download the
result. Everything runs in your browser.
JSON input
never uploadedParsed with the browser’s own JSON parser. Invalid input is reported with a line and column instead of a broken state.
JavaScript output
readyHow it works
Your input is parsed with JSON.parse() in this page and re-serialized as
JavaScript literals — strings are escaped for the quote style you choose, object keys are
quoted only when they are not valid identifiers, and the result is wrapped in the statement
you pick. Numbers keep their parsed value, so extremely large integers may already have been
rounded before conversion. Nothing is sent to a server; the optional share link keeps the
state in the URL fragment, which never leaves your browser.