Skip to content

JSON formatter and validator

Paste JSON to pretty-print it, minify it or check whether it is valid. Your data stays in your browser.

Free, no sign-up. Everything runs in your browser. Your data never leaves your device.

How to use

  1. 1Paste JSON.
  2. 2Choose format or minify.
  3. 3If there is an error, the message shows what is wrong.
  4. 4Copy or download the result.

About this tool

JSON is the most common format for exchanging data between applications and APIs. The most frequent errors are a trailing comma after the last element, single quotes instead of double quotes and unquoted keys. The validator reports them instantly.

When we build integrations and AI automations, JSON is the language between systems, and structured JSON output is the most reliable way to get data from an AI model that a system can process.

What is JSON and what is a formatter for

JSON (JavaScript Object Notation) is a text format for data exchange. It originated from JavaScript syntax, but today practically every programming language supports it, so it has become the standard for API responses, configuration files and data transfer between services. Its advantage is that it is readable by both people and machines, unlike binary formats.

A formatter does two things. First, it "pretty" formats JSON by adding indentation and line breaks, so the structure is visible at a glance. Second, it minifies it by removing all unnecessary whitespace, which is useful when JSON is sent over the network or written to a database. The validator also checks whether the text is valid JSON according to the specification.

A typical example: an API returns one long line with hundreds of fields. You paste it into the formatter and get a neatly indented tree of objects and arrays, where you can immediately see which field is where.

Why is my JSON invalid and how to fix it

Most JSON errors are syntax errors and repeat over and over. JSON is stricter than JavaScript objects, so what works in code often fails validation.

  1. Trailing comma after the last element. {"a": 1, "b": 2,} is not valid JSON, even though many JavaScript parsers tolerate it. Remove that comma.
  2. Single quotes. Keys and string values must be in double quotes. {'name': 'Ana'} is invalid, {"name": "Ana"} is valid.
  3. Keys without quotes. {name: "Ana"} is not JSON. Every key must be a string.
  4. Comments. JSON does not support // or /* */. If you need documentation inside the data, use a separate field, for example "_comment".
  5. Invalid values. NaN, Infinity and undefined do not exist in JSON. Use null or a string instead.
  6. Unmatched brackets and a missing quote. The validator usually reports the exact line and column, so start from the first reported error, because the others may just be consequences.

A practical tip: when something does not work, first check whether the problem is in the data or in the code that reads it. The formatter separates the two for you in a few seconds.

How to format and minify JSON safely

If the JSON contains sensitive data, for example tokens, personal data or configuration with passwords, check where the processing happens. The tool on evi.rs runs in your browser, so the content never leaves your computer. This matters when you work with production data or client data.

When you minify JSON, keep in mind that this only changes the presentation, not the meaning. The minified version is suitable for sending, but bad for manual review and code review. In practice, it is useful to keep the formatted version in the repository and generate the minified one during the build or sending process.

Structured JSON and working with AI models

When an AI model needs to return data that the system processes further, the most reliable approach is for the output to be strictly structured JSON. The model then fills in a predefined schema, and you check that output with a validator before it enters the database or further processing. This avoids manual parsing of free text and the errors that arise from it.

An advanced tip: define a schema with required fields and types, then validate not only the syntax but also the structure. JSON can be syntactically valid while missing a field you expect. For such checks use JSON Schema validators, and this tool for quick syntax checking and readability.

If integrations, automations and data processing outgrow individual tools, EVI Solutions can help with architecture and system integration.

Frequently asked questions

Is my JSON sent to a server?

No. Formatting and validation run in your browser.

How large a JSON file can it handle?

It depends on browser memory. Files of several MB work fine.

Why is my JSON invalid?

Usually because of trailing commas, single quotes or comments, which JSON does not allow.

All tools