Format, validate and minify JSON
Paste strict JSON, choose readable formatting or compact output, and process it in this browser. Formatting uses two spaces per nesting level and changes only whitespace outside strings.
Processing runs in a worker in your current browser tab. Your text and results are not uploaded or included in analytics. This tool does not save them between visits.
How it works
- Paste your JSON text. The displayed character, token and nesting limits depend on your device profile.
- Choose Format with two spaces or Minify, then select Process JSON. Invalid syntax displays a line and column.
- Inspect the preview, then copy or download the complete result. Editing the input or mode clears the previous output.
What valid JSON accepts
JSON supports objects, arrays, quoted strings, numbers, true, false and null. Property names and strings require double quotes. Comments, trailing commas, single-quoted strings, JavaScript expressions and JSON5 extensions are rejected. Syntax checking does not validate a JSON Schema or confirm that the data is correct for your application.
Formatting versus minifying
Formatting adds line breaks and two spaces for each nested level; minifying removes whitespace outside strings. For example, an array containing 1, 2 and 3 keeps those three values in the same order in either mode. Spaces and escape sequences inside a quoted string remain exactly as entered. Objects and empty arrays stay compact when empty.
Number precision and duplicate keys
After bounded syntax validation, this tool formats the original tokens rather than serializing the parsed object. A numeric literal such as 9007199254740993 or 1.2300e+20 stays unchanged. Member order and repeated property names are retained. Duplicate names are still an interoperability risk: other software may keep only the last occurrence, reject them or behave differently. Retaining their spelling does not make duplicates safe for every application.
Errors, previews and limits
Line and column numbers identify where the strict parser detects an unexpected token; columns count UTF-16 code units, so some characters occupy two positions. An unfinished object can be reported at the end of the input. The preview is capped at 12,000 characters; Copy and Download JSON include the full result. Token, depth and UTF-8 output-byte limits prevent excessive allocations. No content is silently repaired.
Frequently asked questions
Is this a JSON Schema validator?
No. It checks strict JSON syntax and formats or minifies it. It does not check required fields, data types against a schema or application-specific rules.
Are comments or trailing commas allowed?
No. Remove comments, trailing commas and JavaScript-only syntax before processing. The formatter does not silently guess how invalid input should be repaired.
Will large numbers or repeated keys change?
The original numeric tokens, property order and duplicate keys are preserved. Software that later parses your output can still round large numbers or discard repeated keys.
Does it store my input?
This tool does not save your text between visits or send it to a server. Copying, sharing or downloading sends the result only to the destination you choose.
Sources
Last reviewed: October 18, 2026
Related tools
- CSV to JSONConvert CSV text to JSON with header and delimiter options. Handle quoted commas and newlines, preserve text values and copy or download the result.
- Text CompareCompare two texts and see every added and removed word or line highlighted. A free, private diff checker that works in your browser, in any language.
- Word CounterCount words, characters, sentences and paragraphs as you type, with reading time. Free, private and works in any language, right in your browser.