Something is wrong with your JSON and you cannot see it on inspection? FixTools surfaces the issue immediately, whether the cause is a trailing comma at the end of an array, a mismatched bracket somewhere in a deeply nested object, an unquoted key copied in from another language, or a stray character hiding inside what looks like a perfectly normal string value.
Loading JSON Validator…
Pinpoints exact error location
Plain-language error descriptions
Catches all JSON syntax errors
Unlimited checks, free forever
Drop the JSON Validator into any page — blog post, product docs, intranet, school portal — with a single line of HTML. Your visitors get the full tool, processed entirely in their browser. No backend, no uploads, no signup.
Embed code
<iframe
src="https://www.fixtools.io/json/json-validator?embed=1"
width="100%"
height="780"
frameborder="0"
style="border:0;border-radius:16px;max-width:900px;"
title="JSON Validator by FixTools"
loading="lazy"
allow="clipboard-write"
></iframe>Attribution-friendly: a small "Powered by FixTools" link appears in the embed footer.
When a JSON parser reports an error like "SyntaxError: Unexpected token ',' at position 47", that compact message actually packs three useful pieces of information into one line. First, the token type: in this case a comma character. Second, the position: character offset 47 from the start of the input string, counting from zero. Third, the implication: a comma at that exact byte was not expected by the JSON grammar at that point in parsing. To map a raw position number into a human-friendly line and column number, you can count characters from the beginning of the file by hand, or paste the string into a tool that performs that conversion automatically. Position-based errors are accurate but require a translation step before they become quickly readable for humans.
Different JavaScript engines format error messages differently for the same invalid JSON input, which is one of the reasons debugging JSON across browsers can feel inconsistent. V8, used by both Chrome and Node.js, reports something like "SyntaxError: Unexpected token ',', ...snippet... is not valid JSON". SpiderMonkey in Firefox reports "SyntaxError: JSON.parse: expected property name or '}' at line 5 column 3 of the JSON data", which is more verbose but also more directly useful. JavaScriptCore in Safari reports the much shorter "SyntaxError: JSON Parse error: Expected '}'". All three engines have encountered the same underlying error but describe it through different lenses. A dedicated JSON checker like FixTools normalises these outputs into a consistent format that includes both the position and a clear description.
The most actionable single piece of information in any JSON error message is the position number. Go straight to that exact character in the input and look at what is there. What you find at that spot is almost always the problem directly: a comma where a closing bracket should be (trailing comma scenario), a single quote where a double quote should be, a letter at a point where a digit should be (unquoted key or undefined-style value), or a < character at position 0 (HTML response masquerading as JSON). The character at the error position is your primary clue. If the character at the position itself looks fine, look one character before it: the parser sometimes reports the location where it gave up rather than where the upstream mistake actually was.
Once you have caught and fixed the immediate error, the next move is to wire an automated error check into your CI pipeline so the same class of failure cannot reach the main branch again. A check JSON for errors step typically runs jq . over every changed JSON file in a pull request and fails the build on any non-zero exit code. For repositories with many JSON files, the find command piped into xargs runs the same check across the entire tree in one shell command. The Python equivalent, python3 -m json.tool, is interchangeable for the same purpose and is preinstalled on most Linux runners. Teams with pre-commit infrastructure add the check-json hook from the standard pre-commit library, which catches the failure on the developer's machine before the commit even lands locally. Each layer adds a little more friction to broken JSON reaching production, and the cumulative effect is that the validator stops being a debugging tool and becomes part of normal day-to-day workflow.
Paste the JSON you suspect has an error and click Validate to find it.
Step-by-step guide to check json for errors:
Paste the JSON
Copy the JSON you want to check from wherever it currently lives, whether a file on disk, a captured API response in your browser network tab, a config snippet in your editor, or a log line from a failing service, and paste the full text into the FixTools validator input. Pasting the raw string rather than a formatted preview is important since the formatter may hide the actual characters.
Check for errors
Click Validate and FixTools scans the entire JSON through the browser native parser in a single pass, reporting every syntax error with the line number, column number, the offending token, and what the grammar expected at that point instead. Because the check runs locally, the result comes back essentially instantly even for large payloads measuring several megabytes in size.
Fix and re-check
Correct each reported error at the exact position the validator identifies. Re-run the validation after each fix rather than batching edits, since JSON parsers stop at the first fatal error and clearing one mistake often reveals the next one hiding behind it. Continue until the validator confirms the JSON is fully error-free and parseable end to end.
Common situations where this approach makes a real difference:
Node.js developer
A developer's Node.js service parses an inbound webhook payload and crashes with "SyntaxError: Unexpected token < in JSON at position 0". They add a console.log of the raw body string before the parse call and discover the webhook endpoint is actually returning a 401 HTML login page whenever the API key header is missing or wrong. The JSON itself is not malformed because the JSON was never sent in the first place. Checking the raw string before assuming the JSON is broken saves significant time, and they add a status code guard before parsing.
Database administrator
A DBA is importing a JSON file into MongoDB using mongoimport and the operation fails with a parse error pointing at line 203. They paste the entire file into FixTools, which immediately reports "Unexpected token at line 203 column 8: found single-quote, expected double-quote". One record buried in the middle of an otherwise clean export has a string value written with single quotes, almost certainly copied in from a Python script during a manual data fix months ago. Replacing that one quote pair allows the full import to complete without further intervention.
Support engineer
A support engineer is reviewing logs from a customer environment where a configuration file is causing application startup to fail. The error message in the log is the unhelpful "Failed to parse config: position 1402" with no line context. The config file is 80 lines long. Pasting it into FixTools converts that byte offset into line 34 column 19 and reports "Unexpected token at line 34 column 19: found //, comments are not allowed in JSON". A developer had added a comment to document a setting without realising JSON does not support comments at all.
Student learning web development
A student is writing their first REST API project and hand-crafts a JSON test payload directly in a text file. Their fetch call returns a 400 error every time. They paste the JSON into FixTools and see "Unexpected end of input at line 12 column 1". The file contains 11 lines describing an object but the closing brace on line 12 is missing entirely. The formatter view shows the unclosed structure immediately on inspection, and the student picks up the habit of always closing every opened bracket before moving on to the next field.
Get better results with these expert suggestions:
Log the raw string before parsing
When JSON.parse fails inside your application code, the single most useful debugging move is to log the raw input string immediately before the parse call. Drop a console.log(JSON.stringify(str)) line right before the parse and capture the output. This shows you the exact bytes being handed to the parser, including any invisible characters, encoding issues, BOM marks, or unexpected prefixes like an HTML doctype that explain why the parser is failing in the first place.
Position 0 errors almost always mean wrong content type
A JSON parse error reported at position 0 almost always means the response body is not JSON at all. The character sitting at position 0 in those cases is typically < for an HTML document, ( as part of a JSONP wrapper, or whitespace from an empty response that the parser cannot consume. Check the actual HTTP status code and the Content-Type header of the response carefully. A 404 or 500 response often returns HTML even when the client originally requested JSON via an Accept header.
Use character counting for small JSON blocks
For short JSON strings under about 100 characters in total length, you can usually locate a position-based error by counting characters by hand: position 0 is the first character, position 1 is the second, and so on. For longer strings the manual count quickly becomes impractical, so paste the JSON into FixTools and let the tool convert the byte offset into a human-readable line and column you can navigate to directly in your editor or viewer without counting at all.
Check encoding when copying from PDFs or emails
Copying JSON snippets out of PDF files or HTML email messages can silently introduce typographic curly quotes (Unicode U+201C and U+201D) instead of the straight double quotes (U+0022) that JSON actually requires. The two look essentially identical on screen at normal font sizes but the curly versions break JSON parsing immediately. If your JSON appears correct on inspection yet keeps failing, paste it into a tool that reveals the actual code points around the quote characters and look for the wrong ones.
More use-case guides for the same tool:
Open the full JSON Validator — free, no account needed, works on any device.
Open JSON Validator →Free · No account needed · Works on any device