Lintify Logo
Lintify
Validators & Formatters

JSON Validator & Formatter

Validate JSON syntax, see clear error messages with line numbers, and pretty-print your JSON in one click. All parsing happens in your browser — nothing is uploaded.

Input
Output
Validated and formatted JSON will appear here. Errors are shown below the input box.

Validate JSON online — instantly, in your browser

The Lintify JSON validator takes whatever you paste into the input panel and runs it through the JavaScript engine that is already running in your browser. If your input is well-formed JSON, the validator re-serializes it with consistent indentation so you can read it. If it is not, you get the same error message your JavaScript code would get — usually with a character offset that tells you exactly where the parser gave up.

That is the whole tool. There is no upload, no rate limit, no sign-up wall. The reason Lintify is fast is that there is no network round-trip — every byte you paste stays on your machine and is parsed by the same JSON.parse call your application uses. This makes the validator safe to use on production payloads, API responses with real customer data, or configuration files with secrets.

What counts as valid JSON?

JSON is defined by RFC 8259. A valid JSON document is one of: an object (in curly braces), an array (in square brackets), a string (in double quotes), a number, a boolean (true or false), or null. Anything else — including single-quoted strings, trailing commas, comments, or unquoted keys — is invalid by the spec, even though many JSON5 or JSONC parsers in the wild will accept it.

Lintify follows the strict spec. That is deliberate: your API clients and server runtimes follow the strict spec too, so a document that passes Lintify will also pass them. If your file is actually JSONC (JSON with comments), strip the comments first — most editors have a command for that.

Common JSON syntax errors (and how to fix them)

  • Missing comma between elements. The error usually says "Expected ',' or '}' after property value" — go to the position the parser reported and add a comma.
  • Trailing comma after the last element. JSON does not allow trailing commas the way JavaScript object literals do. Remove the comma after the last item.
  • Single quotes around strings. JSON requires double quotes. Replace every ' with " for string delimiters.
  • Unquoted object keys. Even though JavaScript object literals allow {foo: 1}, JSON requires {"foo": 1}. Wrap every key in double quotes.
  • Comments. Both // and /* */ comments are forbidden in JSON. Remove them before validating.
  • Control characters inside strings. A literal tab or new line inside a string value must be escaped as \t or \n. Use the JSON Escape tool if you have raw text.

Beautify, minify, copy — all in one place

Once your JSON is valid, the toolbar above the output panel lets you reformat it however you like. Beautify applies consistent indentation (2 spaces, 4 spaces, or a tab) so you can read deeply nested structures. Minify does the opposite — it strips every insignificant character so the output is as small as possible for transport. Copy puts the result on your clipboard in one click.

The status pill next to the input box updates live as you type. Green means valid, red means invalid. The footer of the output panel shows two useful stats: the number of nodes in your document (a measure of complexity) and the raw size in bytes (a measure of payload cost). For a deeper analysis — including the gzipped size and a per-key breakdown — switch to the dedicated JSON Size Analyzer tool.

Why Lintify instead of a server-based validator?

Many online JSON validators send your data to a server, parse it there, and return the result. That works for public test data, but it is the wrong default for the kind of data developers usually work with. API responses from production systems often contain real user records. Configuration files often contain secrets. Diagnostic logs from a customer incident often contain information that should not leave your laptop. Lintify makes privacy the default rather than an opt-in.

There is also a practical benefit: a browser-side validator is faster. The bottleneck for parsing a 5 MB JSON file is not CPU — modern JavaScript engines parse at hundreds of megabytes per second. The bottleneck is the network round-trip, which a server-based tool cannot avoid. By skipping the round-trip, Lintify can validate a multi-megabyte payload in the time a server-based tool would still be waiting for the upload to finish.

Frequently asked questions

Common questions about the Validator & Formatter tool.

Is my JSON data uploaded to a server?
No. Lintify runs every parser entirely in your browser using the built-in JavaScript engine. Your JSON never leaves your device, which makes the validator safe to use even for confidential data such as API responses, credentials, or customer records.
Why does my JSON say 'valid' but the tree looks empty?
A JSON document that contains only a primitive value (a string, number, boolean, or null) is technically valid, but there is nothing to expand in a tree view. Wrap your data in an object or array if you expect nested children to appear.
How do I find the line that has the syntax error?
When validation fails, Lintify shows the error message returned by the parser along with the character position where it gave up. Copy the message into the editor search to jump straight to the offending token, then fix the missing comma, quote, or bracket.
Can I format JSON that has comments in it?
Strict JSON does not allow comments. If your file is actually JSONC (JSON with comments), remove the comments before validating, or use the JSONC-friendly editor in your IDE. Lintify follows the RFC 8259 spec so that what you paste is what your API will actually receive.
What is the largest JSON file I can validate?
There is no upload limit because nothing is uploaded. The practical limit is your machine's available memory — files up to several megabytes format in under a second on a modern laptop. Very large files may take longer or freeze the tab while the browser garbage-collects.

Related tools