Compact JSON
Use one-line JSON for API payloads, logs and storage when you want valid JSON without unnecessary whitespace.
{"name":"Ada","active":true}Paste JSON to create compact JSON, an escaped string or a ready-to-paste JavaScript constant. Need to reverse nested stringification? Destringify or unstringify it in the same private tool.
Runs locally in your browser. Your JSON is never uploaded.
JSON.stringify-style output without writing code.
Paste an object, array, primitive or nested stringified value. Invalid JSON is rejected before anything is copied.
Use one-line JSON for API payloads, logs and storage when you want valid JSON without unnecessary whitespace.
{"name":"Ada","active":true}Use an escaped string when JSON must live inside another JSON field, source string, environment variable or test fixture.
"{\"name\":\"Ada\",\"active\":true}"Use the JavaScript option when you need readable data that can be pasted directly into source code.
const data = {
"name": "Ada"
};Paste valid JSON, choose compact JSON, an escaped JSON string or a JavaScript constant, then select Stringify JSON. The conversion runs locally in your browser.
JavaScript's JSON.stringify() converts a value into JSON text. This tool first validates the input, then produces compact JSON, an escaped string literal or a JavaScript assignment.
Minifying removes spaces and line breaks from JSON. Stringifying can also mean encoding the complete JSON value inside a string, which adds wrapping quotes and escape characters. This page supports both.
Yes. Destringify (also called unstringify) removes up to five valid layers and formats the final object, array or primitive.
No. Parsing, validation and conversion happen locally in your browser.
Need to compare two values instead? Use the JSON Diff Tool. Building a test endpoint? Try the JSON Mock API Generator.