JSON formatter and validator — with the error on the right line.
Paste JSON to format it with two or four spaces, sort keys, minify for transport, and get a clear error with line and column when it doesn’t parse. Everything runs in your browser.
About this free JSON formatter & validator.
The Ronda JSON formatter is a free online tool that pretty-prints, validates and minifies JSON in your browser. Paste any JSON document and it is parsed with the browser’s built-in JSON engine, re-indented with two spaces, four spaces or tabs, and optionally sorted by key. If the document does not parse, the error message names the line and column, and the cursor jumps there.
It is built for the everyday jobs of API and webhook work: reading a minified response, tidying a config file before a commit, shrinking a payload for transport, or finding the one trailing comma that broke a fixture. Nothing you paste is sent to a server, so it is safe to use with production data.
Free · No signup · Runs in your browser · Last updated
- Pretty-print2 spaces, 4 spaces or tabs, chosen from a dropdown.
- Validate with positionParse errors report line and column, and the cursor moves to the spot.
- Sort keysAlphabetical, recursive, so two documents can be compared cleanly.
- MinifyStrip all whitespace for the smallest payload.
- StatsCharacter count, key count and top-level type after every run.
- Copy or downloadOne click to the clipboard or a .json file.
How to format and validate JSON in four steps.
Paste your JSON
Drop the raw text into the input box, or click Sample to try it with an example document.
Pick an indent
Choose 2 spaces, 4 spaces or tabs, and tick Sort keys if you want them alphabetical.
Format or minify
Click Format for readable output or Minify for a single compact line. Cmd/Ctrl + Enter also formats.
Fix errors, then copy
If the JSON is invalid, read the line and column in the status line, correct it, then Copy or Download the result.
JSON formatter questions, answered.
Is my JSON sent anywhere?
No. Parsing and formatting happen in your browser with the built-in JSON engine. You can use this with production payloads without worrying about where they go.
Why does it say 'unexpected token' on a line that looks fine?
The most common causes are a trailing comma after the last item, single quotes instead of double quotes, or an unquoted key. The cursor jumps to the position the parser stopped at, which is usually just after the real mistake.
Can it validate against a schema?
Not here — this tool checks syntax. For JSON that one of your endpoints returns, Ronda’s uptime monitoring can assert on specific JSON paths from 12 regions.
What is the difference between formatting and minifying JSON?
Formatting (pretty-printing) adds line breaks and indentation so people can read the structure. Minifying removes every character that is not part of the data, which makes the document smaller for storage or transport. Both produce identical data; only the whitespace changes.
Does sorting keys change the meaning of the JSON?
No. JSON objects are unordered by specification, so sorting keys produces an equivalent document. Sorting is useful for diffs and code review because two objects with the same content then serialise identically.
Can I use this JSON formatter offline?
Once the page has loaded it works without a network connection, because the parser is the browser’s own JSON engine and no requests are made. Keep the tab open and it keeps working.
Also free.
JWT decoder
Paste a JSON Web Token to see its header and payload decoded, the algorithm, and whether it’s expired or not yet valid — all in your browser.
javascript flavourRegex tester
Type a pattern and flags, paste some text, and see every match highlighted with its capture groups as you type.
text · files · url-safeBase64 encoder / decoder
Encode text or a file to Base64, or decode Base64 back to text — with proper UTF-8 handling, an optional URL-safe alphabet, and a data-URL output for files.
v4 · v7 · bulkUUID generator
Generate random v4 UUIDs or time-ordered v7 UUIDs, in bulk, uppercase or lowercase, with or without hyphens.
unix ↔ dateTimestamp converter
Paste a Unix timestamp (seconds or milliseconds) or a date, and see it in UTC, your local zone and ISO 8601, plus relative time.
structural compareJSON diff
Paste two JSON documents and see exactly which keys were added, removed or changed — ignoring formatting and key order — as a list of paths and as a line diff of the normalised output.
Validating an API response? Assert on JSON paths from 12 regions with uptime monitoring.
Uptime monitoring checks from 12 regions and confirms an outage from a second region before anyone is paged. $2 a monitor a month, your whole team included.