How to use JSON Formatter and Validator
- Paste JSON in the box or add .json files.
- Choose the format: 2 spaces, 4 spaces, tabs or minified, and whether to sort keys.
- Press Start: invalid JSON is reported with its line and column.
- Copy the result or download the .json file.
How JSON Formatter and Validator works
Validation with the exact place
The JSON is parsed by your browser. If it is not valid, a small checker finds where it breaks and tells you the line and column, for example a missing quote or a comma before a closing bracket.
Pretty-print or minify
Pretty-printing adds line breaks and indentation to make JSON readable; minifying removes all spaces to make it as small as possible for APIs and config files.
Sorted keys
Sorting puts object keys in alphabetical order at every level, which makes two JSON files easy to compare.
Comparison
| This site (in-browser) | Typical upload-based sites | |
|---|---|---|
| Your files | Never leave your device | Sent to a remote server |
| Waiting time | No upload, no download queue | Upload + processing + download |
| Limits | None | Often file-size or daily limits |
| Works offline | Yes, once loaded | No |
Tips for the best result
- Trailing commas and single quotes are not allowed in JSON: they are the most common errors.
- Use minified JSON in production, pretty JSON when you read or review it.
- Sort keys before comparing two configurations.
- To convert to YAML, XML or TOML, use JSON to YAML.
Private by design
JSON Formatter and Validator runs entirely inside your browser, in background threads (Web Workers) that use your device's own processor. Your files are never uploaded to our servers, so nobody else can see them, and processing starts instantly with no upload or download wait. Once the page has loaded, the tool keeps working even without an internet connection.
Related tools
- JSON, YAML, XML and TOML ConverterConvert data between JSON, YAML, XML and TOML in any direction. Paste text or add files; nothing is uploaded.
- JSON to CSV / CSV to JSONTurn JSON data into a CSV table, or CSV and Excel into JSON, in your browser, without uploading your data.
- Base64 Encode and DecodeEncode text or any file to Base64, or decode Base64 back to text or the original file, in your browser.
Frequently asked questions
Why does it say my JSON is invalid?
JSON is strict: keys and strings need double quotes, no trailing commas, no comments. The line and column point to the first problem.
Is the order of arrays changed when sorting?
No, only object keys are sorted; arrays keep their order.
Are large numbers kept exactly?
Numbers beyond about 15 digits lose precision in JavaScript. Keep big IDs as strings.
Can I format several files?
Yes, add several files: each gets its own result.
Is my data uploaded?
No. Files and pasted text are processed by JavaScript in your browser and never sent to FileToolsPlus or any server, so you can use it for private configuration files, API keys or customer data.
Does it work offline?
Once the page has loaded, the conversion itself needs no internet connection.