Skip to main content
Turns a piece of structured data, such as an object or a list, into a single JSON text string. Use this when a system you send data to, like a REST API, expects a JSON message rather than separate fields. By default the result is compact, on one line; you can switch on options to make it more readable or to leave forward slashes untouched.

Fields

Sample data

This example formats one object with both options enabled, so the result is indented and the URL keeps its plain slashes.
FieldValue
OptionsPretty print, Unescape slashes
Input:
{
    "product": {
        "sku": "SCARF-01",
        "name": "Wool scarf",
        "price": 24.95,
        "url": "https://shop.example/wool-scarf"
    }
}
Output:
{
    "product": "{\n    \"sku\": \"SCARF-01\",\n    \"name\": \"Wool scarf\",\n    \"price\": 24.95,\n    \"url\": \"https://shop.example/wool-scarf\"\n}"
}