var obj = JSON.parse(string);
Where string is your json string.
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › JSON › stringify
JSON.stringify() - JavaScript - MDN Web Docs
August 28, 2026 - The JSON.stringify() static method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › JSON › parse
JSON.parse() - JavaScript - MDN Web Docs
1 week ago - The JSON.parse() static method parses a JSON string, constructing the JavaScript value or object described by the string. An optional reviver function can be provided to perform a transformation on the resulting object before it is returned.
Top answer 1 of 16
2064
All current browsers have native JSON support built in. So as long as you're not dealing with prehistoric browsers like IE6/7 you can do it just as easily as that:
var j = {
"name": "binchen"
};
console.log(JSON.stringify(j));
2 of 16
124
With JSON.stringify() found in json2.js or native in most modern browsers.
JSON.stringify(value, replacer, space) value any JavaScript value, usually an object or array. replacer an optional parameter that determines how object values are stringified for objects. It can be a function or an array of strings. space an optional parameter that specifies the indentation of nested structures. If it is omitted, the text will be packed without extra whitespace. If it is a number, it will specify the number of spaces to indent at each level. If it is a string (such as "\t" or " "), it contains the characters used to indent at each level.
Jsontostring
jsontostring.com
Convert JSON to String Online
Convert JSON to String Online with our tool. Our Javascript Object to String Converter can convert multiline content with full accuracy online.
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-json-stringify-method
JavaScript JSON stringify() Method - GeeksforGeeks
5 days ago - JS Tutorial · Web Tutorial · ... · Last Updated : 21 Oct, 2026 · The JSON.stringify() method converts a JavaScript value, such as an object or array, into a JSON string....
JSONLint
jsonlint.com › json-stringify
JSON Stringify - Escape JSON for Embedding | JSONLint
If you have a JavaScript object and want JSON, use JSON.stringify(obj). If you have JSON text and need it escaped, use this tool.