JSON Checker: Validate and Format JSON Online
Paste JSON to see whether it is valid, with the line and column of the first error and a plain reason, then format or minify it in one click.
Paste your text and the checker reads it against the JSON standard, RFC 8259. Valid JSON gets a green result and a count of its values; broken JSON gets the line and column of the first problem and why it fails, such as a trailing comma, single quotes or a comment. The sample opens on the most common mistake, a trailing comma after the last member, which the checker reports at the closing brace on line 5, column 1.
Your JSON stays in this browser tab; nothing is uploaded. A valid result means the text follows the RFC 8259 grammar, not that it matches the shape your API or config file expects, so a schema check may still be needed.
Not valid JSON
Line 5, column 1
Trailing comma before "}": JSON does not allow a comma after the last member.
Embed this calculator on your site →
About the JSON Checker
JSON looks like JavaScript but follows a much stricter rulebook, RFC 8259 from 2017. Names and strings take double quotes only, so 'a' fails. The last item in an object or array cannot be followed by a comma. There are no comments, and true, false and null must be lower case. Numbers cannot start with a plus sign or a leading zero, cannot end in a bare decimal point, and NaN and Infinity do not exist. Inside a string, a line break or tab has to be written as \n or \t. This checker walks the text character by character using the grammar in the RFC, stops at the first rule broken, and tells you where and why. Valid JSON can still cause trouble between programs, so the page also warns about duplicate names in one object, integers larger than 2^53 - 1 that many readers round, and numbers like 1E400 that most cannot hold. Formatting rebuilds the text from what was parsed, so every number keeps its exact digits.
Frequently asked questions
Why does my JSON fail with a trailing comma?+
JavaScript and many config formats accept a comma after the last item, but JSON does not. In [1, 2, 3,] or {"a": 1,} the final comma has to go. The checker points at the closing bracket right after it.
Can JSON have comments?+
No. The standard has no comment syntax, so // and /* */ make the text invalid. Some tools accept variants such as JSONC or JSON5 that allow them, but a strict reader, including the browser's JSON.parse, will reject the file.
My JSON is valid but has a warning about a duplicate name. Does it matter?+
Often. RFC 8259 says names within an object should be unique, and readers disagree when they are not: some keep the last value, some the first, some raise an error. Rename or merge the duplicate so every program sees the same data.
Does formatting change my numbers?+
No. Many formatters run the text through a parser that turns 9007199254740993 into 9007199254740992 or drops a trailing zero after the decimal point. This one rebuilds the output from the original tokens, so every number and every escape stays exactly as you wrote it.
Embed this calculator
Free to use on your own site. Paste this snippet where you want the json checker to appear — it resizes itself automatically.
<iframe
src="https://manytools.co/embed/json-checker"
title="JSON Checker by ManyTools"
data-manytools="json-checker"
width="100%"
height="640"
loading="lazy"
style="border:0;width:100%;max-width:720px"></iframe>
<script>
(function () {
window.addEventListener("message", function (e) {
if (e.origin !== "https://manytools.co") return;
var d = e.data || {};
if (d.type !== "manytools:embed:height" || d.slug !== "json-checker") return;
var f = document.querySelector('iframe[data-manytools="json-checker"]');
if (f && d.height) f.style.height = d.height + "px";
});
})();
</script><a href="https://manytools.co/dev/json-checker">JSON Checker by ManyTools</a>