On this page
How it works
The tool reads your input with its own strict JSON parser that follows RFC 8259. When the text is valid, it prints it again with the indentation you chose, or with no whitespace at all when you minify. Numbers and strings are copied character for character, so a 20 digit ID or an escaped Unicode sequence comes out exactly as it went in, which is not the case with tools that round trip through JSON.parse.
When the text is invalid, parsing stops at the first problem. You get a plain description, the line and column, and a short excerpt with a marker under the character. Go to error moves the cursor there in the input box.
Privacy
Your JSON is never sent over the network while you use the formatter, and nothing is saved in your browser storage. Closing the tab clears the input. That matters for API responses, tokens in config files or customer records you would not paste into a remote service.
Looking for more utilities? Browse developer tools and API and integration tools in the directory.
Tips
- Turn on Sort keys before you compare two JSON documents with a diff tool. Matching keys then line up.
- Use Minify for payloads in environment variables, query strings or test fixtures where size matters.
- Converting log timestamps inside a payload? The Unix timestamp converter handles seconds, milliseconds and microseconds.
Limits
- JSON5 and JSONC extensions such as comments and trailing commas are reported as errors, not fixed.
- Duplicate keys are kept as written. Most parsers keep only the last one.
- Syntax colors are turned off for output above 250,000 characters to keep scrolling smooth.
Frequently asked questions
Is my JSON sent anywhere?
No. Parsing, formatting and validation run in JavaScript inside this tab. The text you paste and the files you load are never uploaded, stored or logged, so you can check API responses or configs that contain internal data.
Why does the validator reject comments or trailing commas?
Standard JSON (RFC 8259) does not allow comments, trailing commas, single quotes or unquoted keys. Many config loaders accept them as JSON5 or JSONC, but strict parsers and APIs will fail. The error message names the problem and its line and column so you can fix it.
Will formatting change my numbers or strings?
No. The formatter keeps every number and string exactly as written, including very large integers and escape sequences. Only whitespace changes, plus key order when you turn on key sorting.
How does key sorting work?
With Sort keys turned on, the keys of every object are sorted by their character codes, so uppercase letters come before lowercase ones. Arrays keep their order, because the order of array items carries meaning.
How large a file can it handle?
Several megabytes work well on a recent laptop. Input above 1 MB is not processed while you type: press Format or Minify when you are ready. Very large files are limited by the memory of your browser tab.
