JSON.stringify in JSON

From the JSON cheat sheet ยท JavaScript ยท verified Aug 2026

JSON.stringify

Convert a JavaScript value to JSON text.

javascript
const text = JSON.stringify({ name: 'Ana', active: true })
๐Ÿ“Œ undefined object properties are omitted
โš ๏ธ BigInt throws unless transformed
๐Ÿ’ก The third argument controls indentation
๐Ÿ” replacer filters or transforms values
javascriptstringifyreplacer

Continue with JSON

Save the full cheat sheet or work through every related task.

More JSON tasks

Back to the full JSON cheat sheet