JSON Validator
Validate, format, and minify JSON — or explore it in an interactive tree viewer with search, expand/collapse, and a detail panel for any selected node. Load JSON straight from an API by pasting a URL or a full curl command, convert Python dict/list literals (single quotes, True/False/None, tuples, trailing commas) to JSON, and see syntax errors with the exact line and column.
How to use JSON Validator
- Paste your JSON — or a Python dict/list — into the input box, or load it from an API by entering a URL or curl command and clicking Fetch.
- Use Prettify or Minify, or switch the view to Tree to browse the structure.
- In Tree view, search keys and values, expand nodes, and click any node to see its path and full value.
Frequently asked questions
- Can I load JSON from a URL or a curl command?
- Yes. Paste an API URL or a full curl command into the "Load from URL or curl" box and click Fetch — the request runs from your browser and the response is loaded into the input. curl flags like -X, -H, -d, and -u (basic auth) are parsed, and the result is then formatted and validated like any pasted JSON.
- Why does fetching from a URL sometimes fail?
- The request is made from your browser, so the target server must allow cross-origin requests (CORS). If it does not, the fetch is blocked by the browser — that is a server-side policy, not a limit of this tool. A wrong URL or being offline will also fail.
- How does the JSON tree viewer work?
- Switch the view to Tree to see your JSON as a collapsible structure. Search filters and highlights matching keys and values and auto-expands to them, and clicking any node shows its JSONPath and full value in the detail panel — with copy buttons for both.
- Can it convert a Python dict to JSON?
- Yes. Paste a Python dict or list literal — single quotes, True/False/None, tuples, and trailing commas are all understood — and the formatter outputs valid JSON with proper double quotes and lowercase true/false/null.
- Why is my JSON invalid?
- Common causes are trailing commas, single quotes instead of double quotes, or unquoted keys. Pure JSON is strict about these, though this tool will also accept Python-style dicts. The validator points to the exact line and column.
- Is there a size limit?
- No hard limit — it is bounded only by your browser, since parsing happens locally.