Compact JSON
Use one-line JSON for API payloads, logs and storage when you want valid JSON without unnecessary whitespace.
{"name":"Ada","active":true}Validate JSON, compact it to one line, create a correctly escaped JSON string, reverse nested stringification, or export a ready-to-paste JavaScript constant.
Your data stays in this browser.
Choose the output you actually need. Invalid input 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"
};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. 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.