Free · Local · No sign-up

JSON Stringify Online

Validate JSON, compact it to one line, create a correctly escaped JSON string, reverse nested stringification, or export a ready-to-paste JavaScript constant.

Compact: {"ok":true}

Escaped: "{\"ok\":true}"

JavaScript: const data = { ... };

Your data stays in this browser.

Stringify, escape or unstringify JSON

Choose the output you actually need. Invalid input is rejected before anything is copied.

0 bytes · 1 line

Paste JSON above and choose an action.

0 bytes · 1 line

Which JSON output should you use?

Compact JSON

Use one-line JSON for API payloads, logs and storage when you want valid JSON without unnecessary whitespace.

{"name":"Ada","active":true}

Escaped JSON string

Use an escaped string when JSON must live inside another JSON field, source string, environment variable or test fixture.

"{\"name\":\"Ada\",\"active\":true}"

JavaScript constant

Use the JavaScript option when you need readable data that can be pasted directly into source code.

const data = {
  "name": "Ada"
};

JSON stringify FAQ

What does JSON.stringify do?

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.

What is the difference between stringify and minify?

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.

Can I reverse double-stringified JSON?

Yes. Unstringify removes up to five valid layers and formats the final object, array or primitive.

Is sensitive JSON uploaded to FastUtils?

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.