JSON.stringify(value) Last updated: 26. Apr 2026

Converts a JavaScript object or value to a JSON string.

Parameters

Name Type Description
value object Object to convert to a JSON string.

Returns

Specified object converted to a JSON string.

Example

Code example (#JS)

#JS is mixed HTML (or other text file) with inline JavaScript with # starting and ending each inline statement.
#write(JSON.stringify({"name":12}))#

Output

The #JS code above produces the output shown below:
{"name":12}