Precise validation feedback
Find malformed JSON with useful parser diagnostics, line and column locations, and the affected line instead of a generic invalid message.
Format, validate and minify JSON in your browser. Invalid JSON shows the parser's message and, in most browsers, the line and column where parsing stopped. Indent with 2 or 4 spaces or tabs, sort keys, and explore a searchable tree with JSON paths and statistics. Paste text or open a .json file up to 10 MB; it is not uploaded.
1{2"project": "Toolkit",3"version": 1,4"active": true,5"tools": [6{7"name": "JSON Formatter",8"category": "Developer",9"features": [10"format",11"validate",12"inspect"13]14},15{16"name": "Scientific Calculator",17"category": "Calculators",18"features": [19"trigonometry",20"calculus",21"vectors"22]23}24],25"metadata": {26"private": true,27"serverUpload": null28}29}
The editor validates on every change. Once the structure is valid, choose a clean output format and inspect the document without switching tools.
Paste into the editor, drag in a .json file, or choose Open JSON. Files up to 10 MB are read by your browser; larger files are not opened.
Validation runs as you type. If the JSON is invalid, read the parser message, the line and column, and the excerpt under the editor, then edit until it shows Valid JSON.
Choose 2 spaces, 4 spaces or Tab, tick Sort keys to alphabetize them, then press Format JSON (Ctrl or ⌘ + Enter) or Minify (add Shift). Copy the output or download it as a .json file.
Open Tree view to expand objects and arrays, or search keys, values and paths such as $.users[0].name. Statistics counts objects, arrays, keys and each value type, plus the nesting depth.
Find malformed JSON with useful parser diagnostics, line and column locations, and the affected line instead of a generic invalid message.
Pretty-print with two spaces, four spaces or tabs, sort keys recursively, and search keys, values or JSON-style paths in a collapsible tree.
Calculate value counts, types, nesting depth and file size without uploading source data or formatted output to a server.
Paste your JSON, choose 2 spaces, 4 spaces or Tab, and press Format JSON or Ctrl/⌘ + Enter. The result appears with syntax colours and line numbers, ready to copy or download. Tick Sort keys to alphabetize property names at every level; array items always keep their order.
The validator runs JSON.parse in your browser and shows its message, such as Expected ',' or '}' after property value, with the line, column and source line when the browser reports a position. Chrome, Edge and Firefox report one; Safari's messages usually do not. JSON.parse stops at the first error, so fix it and check again.
Trailing commas after the last item, single-quoted strings, unquoted property names, missing commas or colons, comments, and unescaped line breaks inside strings. Values such as undefined, NaN and functions are not JSON either. Standard JSON needs double quotes and allows no comments, so JSONC or JSON5 files with comments show as invalid here.
Yes. Press Minify, or Ctrl/⌘ + Shift + Enter, to remove all indentation and line breaks between values. Text inside strings is untouched. The output size appears under the result, so you can compare it with the input size shown above the editor before copying or downloading.
The values stay the same with three exceptions, because the JSON is parsed as JavaScript. Integers beyond 9,007,199,254,740,991 lose precision (12345678901234567890 becomes 12345678901234567000), numbers are rewritten in their shortest form (1.50 becomes 1.5 and 1e3 becomes 1000), and if a key appears twice in one object, only the last value is kept.
Open Tree view and expand only the objects or arrays you need; the first two levels open automatically. Search matches property names, values and paths such as $.users[0].email, shows up to 100 results, and clicking a result copies its path.
No. Validation, formatting, tree search and statistics all run in your browser, and files are read locally with browser APIs. Your JSON is not sent to a Toolkit server or saved, so reloading the page brings back the example.
No. It checks that the text is valid standard JSON and shows its structure, but it does not test a document against a JSON Schema, an OpenAPI definition or another API contract.
Explore the growing collection for calculations, documents, writing, and everyday work.