JavaScript Object to JSON

Convert a JS object literal into strict, valid JSON.

Support
Works Offline
Privacy First
No Login
No API

JavaScript object literal

Strict JSON

About the JavaScript Object to JSON

Paste a JavaScript object or array literal — with unquoted keys, single quotes, comments, or trailing commas — and convert it into strict, standards-compliant JSON.

Examples

Unquoted keys

{ name: 'Ada', age: 28 }

Output

{"name":"Ada","age":28}

Keyboard shortcuts

  • Copy the main outputCtrl / ⌘ + Shift + C
  • Download the resultCtrl / ⌘ + S
  • Share this toolCtrl / ⌘ + Shift + S
  • Reset the inputsAlt + R
  • Open the tool search paletteCtrl / ⌘ + K

Related tools

Frequently asked questions

Version 1.0.0 · Updated 2026-08-06 · Runs entirely in your browser