JSON Formatter & Validator
Pretty-print, minify, and validate tag config JSON, GA4 measurement-protocol payloads, GTM container exports, and Meta CAPI request bodies.
All processing is local — your payload never leaves the browser.
127 bytes · 7 keys
Pretty
{
"event": "purchase",
"ecommerce": {
"transaction_id": "ORD_98765",
"value": 158,
"items": [
{
"item_id": "SKU_1",
"item_name": "Sweater"
}
]
}
}Minified
{"event":"purchase","ecommerce":{"transaction_id":"ORD_98765","value":158,"items":[{"item_id":"SKU_1","item_name":"Sweater"}]}}Try these next
Related tools you'll probably want
Need help formatting complex data layer payloads?
I configure custom data layers and server GTM transformations for enterprise eCommerce platforms.
How to use the GTM & GA4 JSON Formatter & Linter
Working with dataLayer payloads, GTM container exports, and API responses requires clean, valid JSON. This formatter indents, validates, and cleans minified or unescaped JSON strings with automated syntax error detection.
Step by step
- Paste your raw, minified, or unformatted JSON into the editor.
- Click Format to beautify with standard 2-space indentation.
- Review automated syntax error flags (missing commas, trailing commas, unquoted keys).
- Copy the clean, validated JSON string for your documentation or code.
How to read your result
Valid JSON Formatted
Clean, properly indented JSON structure verified against RFC 8259 specifications.
Common mistakes
- Leaving trailing commas in JSON objects, which causes parsing failures in strict JSON parsers.
- Using single quotes instead of standard double quotes for JSON keys and values.
Questions
Is my data secure?
Yes. 100% of formatting and parsing executes locally in your browser memory. No data is transmitted to external servers.
Need help formatting complex data layer payloads?
I configure custom data layers and server GTM transformations for enterprise eCommerce platforms.