JSON Formatter & Validator
Format, beautify and validate JSON online free. Pretty-print with 2- or 4-space indents or minify to one line, and see why invalid JSON fails. Runs in-browser.
Runs in your browserNothing uploadedFree · no signup
Frequently asked questions
- Does this validate JSON?
- Yes. If your JSON is invalid, the error message shows what went wrong and where.
- Is my JSON uploaded anywhere?
- No. Formatting and validation run entirely in your browser. Nothing is sent to a server.
- Why is my JSON invalid when it looks fine?
- JSON is stricter than JavaScript. The usual culprits are a trailing comma after the last item, single quotes instead of double quotes, unquoted keys, and comments — none of which JSON allows. The error message gives the position of the first problem.
- Can formatting change my numbers?
- Occasionally. The JSON is parsed with your browser's built-in parser, which stores numbers as JavaScript doubles: integers longer than about 16 digits (beyond 9,007,199,254,740,991) are rounded, and 1.50 is written as 1.5. If your data has long numeric IDs, keep them as strings.
- What is the difference between beautify and minify?
- Beautify adds line breaks and 2- or 4-space indentation so nested objects are easy to read. Minify removes all optional whitespace and puts everything on one line, which makes the file smaller for sending over a network. The data is the same either way.