Paste JSON and this page opens in Minify mode: it parses your text, then writes it back on one line with no spaces, tabs or line breaks. Values, key order and string contents stay exactly as they were, and if the JSON is invalid you get the error instead of a broken result. Parsing happens in your browser.
Runs in your browser
Free, no sign-up. Parsing, formatting and downloads all run in your browser. The JSON you paste is never uploaded, logged or sent to analytics.
Validate strict JSON, format it for reading, or minify it for production use.
Formatted or minified JSON will appear here.Status
Checking...
Output Chars
0
Keys
0
Depth
0
Sample data
{
"name": "Sample item",
"tags": ["a", "b"],
"price": 12.5
}{"name":"Sample item","tags":["a","b"],"price":12.5}The space inside the string Sample item is kept: only whitespace between tokens is removed.
Minified JSON is smaller to send and store, but harder to read. Keep a formatted copy for editing and minify only the version you ship. Gzip or Brotli on your server shrinks formatted JSON a lot too, so measure before assuming minifying matters for your case.
JSON (RFC 8259) allows objects, arrays, double-quoted strings, numbers, true, false and null. Keys must be double-quoted strings.
Things many editors accept but JSON does not: single quotes, trailing commas, comments, unquoted keys, NaN, Infinity and leading zeros such as 007. This tool rejects all of them, so output that passes here will parse in any standards-compliant JSON parser.
Format adds line breaks and indentation so nesting is easy to read in reviews, logs and documentation.
Minify removes every optional space and line break. The data is identical; only the size changes, which helps for payloads, config embedded in code, and storage.
JavaScript stores numbers as 64-bit floats, so integers above 9,007,199,254,740,991 and long decimals are rounded by JSON.parse. Many formatters silently change such values.
This tool keeps the digits exactly as you wrote them and warns you when a number cannot be represented exactly by JavaScript, so you can send it as a string instead.
Number.MAX_SAFE_INTEGER = 2^53 - 1 = 9007199254740991
JSON allows the same key twice in one object, but JSON.parse keeps only the last value. The tool keeps every occurrence in the output and lists the duplicates in a warning.
A UTF-8 byte-order mark at the very start of the input is removed and reported, because strict parsers reject it.
No. Only insignificant whitespace between tokens is removed. Strings, numbers, booleans, null and the order of keys are written back unchanged.
Minify needs valid JSON. Trailing commas, single quotes, comments and unquoted keys are not JSON, so the tool reports where parsing failed and leaves the output empty.
Yes. Switch the mode to Format to indent the same text again with the spaces or tabs you choose.
No. It is parsed and re-written by JavaScript in your browser tab.
We build internal tools, APIs and integrations that fit your team's workflow, from a single admin screen to a full backend.