How to format and validate JSON
- Paste your JSON into the left box, or press Try an example to see how it works.
- Check the status under the box. A green tick means the JSON is valid. If there's an error, you'll see its line, column and a pointer to the exact spot.
- Choose Format or Minify, and pick 2 spaces, 4 spaces or tabs for indentation. Switch on Sort keys A–Z to order object keys alphabetically.
- Copy or download the result from the right-hand box.
Features
- Instant formatting as you paste, with no button to press.
- Precise error messages, with line and column numbers and the problem line highlighted.
- Minify to the most compact valid JSON.
- 2-space, 4-space or tab indentation.
- Recursive key sorting for clean diffs and easier reviews.
- Size before and after, so you can see how much minifying saves.
- Copy to clipboard and download as .json.
- Handles large files smoothly without freezing the page.
Why use Fileora's JSON formatter
Developers paste some of their most sensitive data into JSON formatters: API responses containing customer details, JWTs, configuration files with secrets. Many online formatters send that data to a server. Fileora doesn't. It uses the JSON parser built into your browser, so the data never leaves your machine, and the page keeps working even if you go offline after it loads.
It's also fast and uncluttered, with the input and output side by side on a laptop and stacked on a phone. There's no account and no daily limit.
Other developer-friendly tools on Fileora: generate a strong secret with the password generator, count characters in a payload or message with the word counter, or turn a URL into a QR code.
Common JSON mistakes
The most frequent error is a trailing comma after the last item in an object or array, which JavaScript allows but JSON doesn't. Next come single quotes: JSON strings and keys must use double quotes. Unquoted keys like {name: "x"} are also invalid. Inside strings, line breaks and tabs must be escaped as \n and \t, and backslashes as \\. Finally, JSON has no undefined, NaN or comments: use null instead of a missing value, and remove comments before parsing.