Trailing comma
Illustrative exampleA comma after the last item in an object or array. Fine in many programming languages, invalid in JSON.
{ "name": "Ada", "active": true,}{ "name": "Ada", "active": true}Paste your JSON and find out right away whether it’s valid. If it isn’t, Captain JSON shows the exact error location with the line and column number and a clear error message — so you can fix it fast, even in large files.
Part of the Captain JSON toolkit — 20+ JSON tools in one extension.
Example: a trailing comma makes this JSON invalid
Illustrative example{ "service": "billing", "retries": 3, "endpoints": ["/v1/invoices", "/v1/payments",], "debug": false}Your JSON toolkit. Wherever you develop.
Captain JSON is designed to fit into your everyday development workflow. Access your JSON productivity toolkit through your preferred browser and make JSON formatting, comparison, and validation easier.
Available today: Google Chrome, Microsoft Edge and Mozilla Firefox. More browsers are coming soon.
A JSON validator checks that text follows JSON syntax: quoted keys and strings, commas in the right places, and matching braces and brackets. Captain JSON’s JSON Validator detects malformed JSON and shows the exact error location, highlighting the line and column number with a clear error message. It checks syntax only — validating against a JSON Schema is a separate step, handled by Captain JSON’s JSON Schema Validator.
About Captain JSON: Captain JSON is a browser extension by PiratesOfBugs that provides JSON developer utilities including JSON comparison, formatting, pretty printing and validation.
Find out whether your JSON is valid — and exactly where it isn’t.
Check that your text is well-formed JSON.
Catch trailing commas, bad quotes, missing brackets and other syntax mistakes.
Jump straight to where the problem is instead of scanning the file.
The line and column of the error are highlighted for you.
Get a result quickly, even on big documents.
Understand what went wrong from a clear error message.
Validate large files — Captain JSON has been tested with files over 30MB.
A single missing comma, an extra trailing comma or a stray quote makes a JSON document unparseable — and parsers often report little more than “Unexpected token”. Hunting for the culprit by eye in a long config or API payload is slow and error-prone.
Captain JSON validates your JSON quickly and points to the line and column of the error with a clear message, so you can jump straight to the fix instead of scanning the whole file.
Catch syntax errors where they’re cheapest to fix — before they reach a request, a test run or a deployment.
Check that a request body is well-formed JSON before you send it, so a syntax slip doesn’t show up as a confusing 400 error.
Validate app, build and infrastructure config stored as JSON before it reaches an environment.
When parsing fails with “Unexpected token”, validate the input to find the exact line and column.
Validate test fixtures and expected-response files so a malformed JSON file doesn’t fail a test run for the wrong reason.
Make a final syntax check on edited JSON configuration so a missing comma doesn’t take a deployment down.
Four quick steps from install to a clear answer.
Add the extension from the Chrome Web Store or Firefox Add-ons and open it from your browser toolbar.
Choose Validator in the Captain JSON workspace.
Drop in the JSON you want to check — an API response, a config file, a log line.
If the JSON is valid you’re done. If not, use the highlighted line and column and the error message to find and fix the problem.
Most invalid JSON comes down to a handful of mistakes. These illustrative examples show what each one looks like and how to fix it. They are examples, not screenshots of the extension.
A comma after the last item in an object or array. Fine in many programming languages, invalid in JSON.
{ "name": "Ada", "active": true,}{ "name": "Ada", "active": true}JSON strings and keys must use double quotes.
{ 'name': 'Ada'}{ "name": "Ada"}Object keys must be quoted strings, unlike in JavaScript object literals.
{ name: "Ada"}{ "name": "Ada"}Items in an object or array must be separated by commas. Here the comma is missing at the end of line 2.
{ "name": "Ada" "active": true}{ "name": "Ada", "active": true}Install Captain JSON and validate your next config or API payload — with the exact line and column of any error — right in your browser.
Need more than JSON Validator? Explore all 20+ Captain JSON tools.
We use analytics cookies to understand how the site is used. No personal data is sold. See our privacy practices before choosing.