JSON Formatter & Validator
Web tool · Free · Works without an account · Runs on your device
Paste your JSON and press Format to indent it, Minify to compact it, or Validate to find mistakes: an invalid file shows the exact line and column with a plain-English hint. Everything runs in your browser, so nothing you paste is uploaded, and numbers beyond JavaScript's safe range are kept exactly as written.
Paste or drop a JSON file. Format with 2 spaces, 4 spaces or tabs, minify, or validate and see exactly which line and column is wrong, with a plain-English hint. Sort keys, repair common mistakes while seeing what changed, and browse the result as a searchable tree.
Updated
Your JSON stays on this device. It is processed in your browser, in a background thread — nothing is uploaded and this page makes no network requests with your data. Even so, avoid pasting live production secrets into any website.
How to use the JSON Formatter & Validator
- Paste JSON into the box, or drop a .json file onto it.
- Choose Format (2 spaces, 4 spaces or tab), Minify or Validate.
- If there is an error, read the line, column and hint, then click “Go to error”. Or turn on “Repair common issues” to fix comments, trailing commas and single quotes.
- Optionally sort keys, or switch to Tree view to search and click a value to copy its path.
- Copy the result or download it as a .json file.
- Is my JSON uploaded anywhere?
- No. The page reads and processes your JSON entirely in your browser, in a background thread on your device. It makes no network request with your data, so you can paste payloads that contain tokens or customer records. Still, avoid pasting live production secrets into any website.
- Why does it say my JSON is invalid when it works in JavaScript?
- JSON is stricter than JavaScript object syntax. Keys and strings need double quotes, trailing commas are not allowed, there are no comments, and NaN, Infinity and undefined do not exist. The error message points at the exact line and column, and “Repair common issues” can fix the usual ones for you.
- What does “Repair common issues” change?
- It removes // and /* */ comments and trailing commas, turns single-quoted strings and unquoted keys into double-quoted ones, replaces NaN, Infinity and undefined with null, and converts Python's True, False and None. Every change is listed with its line and column, so you can check it before you copy the result.
- Are very large numbers changed when I format?
- No. Numbers are copied exactly as written, so an ID like 12345678901234567890 stays intact. Plain JavaScript would round it, because browsers can only hold integers exactly up to 9,007,199,254,740,991 (2^53 − 1). The tool warns you when a number is beyond that, since your own code may still round it.
- How big a file can I use?
- Several megabytes work comfortably: parsing runs in a background thread with a progress bar, so the page does not freeze. The tree view is limited to files up to 8 MB and shows long lists a page at a time; Format, Minify and Validate have no fixed limit apart from your browser's memory.
- Does sorting keys change the meaning of my JSON?
- No. JSON objects are unordered by definition, so sorting keys is safe for parsers that follow the spec. Arrays are never reordered. Sorting is by Unicode code unit, so the result is the same on every computer.
- What happens to duplicate keys?
- They are kept, in their original order, and you are warned. The JSON standard does not say which duplicate wins — most parsers keep the last one — so duplicates are usually a bug worth fixing.
- How do I get the path to a value?
- Switch to Tree view and click any key or value. Its path, such as $.users[0].email, is copied to your clipboard. Keys with spaces or symbols are written like $["first name"].
Also in Developer tools
- Base64 & URL Encoder / DecoderEncode and decode Base64, URL-safe Base64, URL percent-encoding and HTML entities — text or files, offline in your browser.
- JWT Decoder & VerifierDecode a JSON Web Token, read its claims and expiry, and verify the signature — entirely in your browser; your token is never sent anywhere.
- Excel ⇄ CSV ⇄ JSON ConverterConvert between Excel, CSV, JSON, XML, SQL, YAML and more, preview, edit and clean the table — in your browser.
- QR & Barcode GeneratorUPI payment, WhatsApp, website, Wi-Fi, contact and event QR codes, plus product barcodes — styled, checked and print-ready.
- Bug ReporterOne click: screenshot, console logs, network requests, browser details and steps — a complete bug report.
- QR & Barcode ScannerScan QR codes and barcodes with your camera or from a photo — open links, UPI and Wi-Fi safely.
- Screen RecorderRecord your screen, a window or a tab with your voice — right in the browser, no install.
- Meeting & Time Zone PlannerFind a meeting time that works across India, the US, UK, Gulf and more — and share it.
Need a tool like this built around your business?
Tell us how it works today. We’ll come back with a clear plan, timeline and estimate — usually within two business days.