Web Tools / Convert

JavaScript Object to JSON Converter

Convert JavaScript object notation into valid JSON in your browser. Paste an object literal, format it, and copy the JSON output right away.

Live conversion Browser only
Input
Output

Turn JS object text into valid JSON

This converter is handy when you copied an object literal from code or logs and need clean JSON for APIs, tests, or documentation.

{ "name": "Alex", "active": true, "score": 42 }

Related tools

Try the Markdown and HTML tools if you are moving data between formats.