JSON Formatter & Validator

Paste your JSON below to format, validate or minify it. Choose your indentation level. All processing happens locally in your browser.

Copied!

What is JSON?

JSON (JavaScript Object Notation) is a lightweight data-interchange format that is easy for humans to read and write and easy for machines to parse and generate. It supports objects, arrays, strings, numbers, booleans, and null values.

Formatting (pretty-printing) adds indentation to make JSON readable, while minifying removes all unnecessary whitespace for smaller payload sizes.

When something will not parse, the message alone rarely helps, so the page works out the line and column from the reported offset and prints the offending line with a caret under it. The loose option strips comments and trailing commas first, which is what makes a tsconfig or an editor settings file usable here at all. Sorting the keys makes two documents comparable in a diff, and the ASCII option escapes everything above plain ASCII for pipelines that mangle anything else.

Reshaping data by hand again?

A payload you have to fix in a browser tab every time is a job for code. We build the integrations, parsers and services that move data between systems, and we repair the ones that quietly corrupt it on the way through.

Tell us what you are moving

Frequently Asked Questions

Why does my file fail with a message about position?
Because JSON reports errors as a character offset, which is useless on a long file. This page turns that offset into a line and column and prints the offending line with a caret under the exact spot, so you can go straight to it.
Can it read a tsconfig or an editor settings file?
Yes, with the loose option on. Those files use comments and trailing commas, which are not JSON, so the page strips them before parsing and tells you it did. What comes out is plain JSON that any parser will accept.
Why did my long ID number change?
Because JSON numbers are parsed as doubles, which lose precision above about sixteen digits. A large database identifier arrives rounded, and no formatter can recover it. The page warns you when it sees one; the fix is to carry such identifiers as strings.
What is the sort keys option for?
Comparing two documents. The same data with the keys in a different order produces a completely noisy diff, so sorting both sides makes the real differences visible. It sorts at every level, not just the top.
Is my data uploaded anywhere?
No. Parsing and formatting happen in your browser using its own JSON support. Nothing is sent anywhere, which matters because the files people paste into a formatter are usually configuration or API responses from systems they would rather not share.