Almost every JSON file that breaks a system was fine one step earlier. It started as a clean CSV, XML or YAML document, a converter turned it into JSON, and somewhere in that handoff the output picked up a trailing comma or a single-quoted string. The receiving system then rejects the file, usually with an error that gives no hint which step went wrong.

The cheap defence is one final pass that exists only to check, not to fix: run the converted output through the JSON Formatter and Validator on Ovatly using Validate only. It confirms the file is strict JSON before you send it on, and when it is not, it names the problem in plain words. This guide explains why that last look matters, and what a pass does and does not prove.

Contents

  • Quick answer
  • Why converted JSON deserves one more check
  • Validate only: the pass that changes nothing
  • The strict rules the validator enforces
  • What a pass proves, and what it does not
  • How to validate converted JSON, step by step
  • Worked example: a trailing comma caught before sending
  • Limitations and honest tradeoffs
  • Common mistakes
  • FAQs
  • Conclusion
  • References

Quick answer

After any conversion to JSON, paste the output into the JSON Formatter and Validator and choose Validate only. It checks the text without changing it and either confirms the file is valid strict JSON or reports the problem in plain words, such as an unexpected character or a missing comma. Fix what it names and validate again. Only send the file once it passes, and remember: a pass proves syntax, not schema or correct values.

Why converted JSON deserves one more check

A conversion chain is only as strict as its loosest step. CSV to JSON converters have to invent structure CSV never had: what becomes a key, what stays a string. XML to JSON converters map attributes and repeated elements onto objects and arrays, and one occurrence of an element can come out shaped differently from two. YAML to JSON converters start from a format that allows comments and unquoted strings, neither of which exists in JSON.

Each converter does its job honestly, but the output can still be near-JSON rather than JSON: readable, plausible, and rejected by the first strict parser it meets. The failure then surfaces far from its cause, at import or deploy time. Validating at the end of the chain moves the failure to the moment you can still fix it, and tells you which rule was broken.

Validate only: the pass that changes nothing

The validator offers three things: pretty-printing with a 2 or 4 space indent, minifying to a single line, and Validate only. For a final check, Validate only is the right choice because it does nothing else. It parses the text, confirms it is valid, and leaves every character untouched, so the file you approved is the file you send.

The other two modes reformat what they touch, which is useful earlier in your workflow and wrong at the end of it. Reformatting also carries a quiet risk with numbers: JSON numbers are handled with JavaScript precision, so an integer beyond 2^53 loses exactness when reformatted. Validate only cannot introduce that change. If the file passes as it stands, ship it as it stands.

The strict rules the validator enforces

The validator checks against the strict JSON standard, with no extensions. Strings must use double quotes; single-quoted strings are invalid. Keys must be quoted. A trailing comma after the last item in an object or array is invalid. And comments are not allowed anywhere, because JSON has no comment syntax, so a file written in a comment-tolerant style such as JSONC fails here even if its producer was happy.

This strictness is the point. Many parsers are lenient and accept some of those forms, which is how flawed files travel so far before failing. A file that passes the strict check is one every compliant parser can read, including the receiving system's.

What a pass proves, and what it does not

A passing validation proves one thing: the text is syntactically valid JSON. The punctuation is balanced, the quoting is correct, the structure parses. That is a real guarantee, and it eliminates an entire class of import failures.

It does not prove anything else. It does not prove the fields match the receiving system's schema, that required keys are present, that values were carried through with the right types, or that the data itself is correct. A file can be perfectly valid JSON and still be the wrong JSON. Validation certifies the container; the receiving system remains responsible for judging the contents.

How to validate converted JSON, step by step

  1. Take the output of your final conversion exactly as produced. Do not tidy it first; the point is to check the real file.
  2. Open the JSON Formatter and Validator and paste the output in.
  3. Choose Validate only. The tool checks the text without changing it.
  4. Read the result. If it passes, the file is strict JSON and ready to send. If it fails, the error names the problem in plain words, such as an unexpected character or a missing comma.
  5. Fix the named problem, in the file or at the step that produced it, and validate again until it passes. Then send the file unchanged.

Worked example: a trailing comma caught before sending

Suppose a conversion produces this object:

{
  "name": "Ana",
  "age": 31,
}

It looks harmless, and a lenient parser might accept it, but the comma after 31 is a trailing comma and strict JSON forbids it. Validate only rejects the file and names the problem, instead of letting the receiving system discover it later. Remove the comma and the check passes.

This file, by contrast, passes exactly as written:

{"name":"Ovatly","tools":250,"free":true}

Nothing was reformatted or reordered. The check confirmed the syntax and got out of the way, which is all a final pass should do.

Limitations and honest tradeoffs

Validation is a syntax check, full stop. It cannot confirm a schema, a required field, or a correct value, and treating a pass as a full quality check is a mistake.

Very large pastes may take a moment to check, so give the tool a second before assuming it has stalled. And while the error messages name the problem in plain words, they do not repair it: the fix is yours to make, ideally in the step that introduced it, so the next conversion comes out clean too. Everything runs fully locally in your browser, so the check costs you no upload and no exposure of the data.

Common mistakes

  • Pretty-printing as the final step. Reformatting changes the file after you checked it, and can alter very large integers. Validate only, then send the file exactly as validated.
  • Assuming valid means correct. A pass proves syntax, not schema, not values. Keep the receiving system's own checks in place.
  • Fixing the output but not the source. If a converter keeps emitting trailing commas, patching each file by hand repeats forever. Fix the step that produces them.
  • Skipping the check because the last conversion worked. Chains fail at their loosest step, and inputs change. The check takes seconds; run it every time.

FAQs

Does Validate only change my JSON in any way? No. Validate only checks the text and reports whether it parses. It does not reformat, reorder or rewrite anything, which is exactly why it is the safe final pass after a conversion: the file you validated is the file you send.

Why does the validator reject JSON that my own app accepts? Because it enforces the strict standard. Trailing commas, single-quoted strings and unquoted keys are invalid, and comments are not allowed, since JSON has no comment syntax. Lenient parsers accept these, but the strict file is the one every system can read.

What does a passing validation actually prove? It proves the text is syntactically valid JSON: correct punctuation, quoting and structure. It does not prove the fields match the receiving system's schema, that required keys are present, or that the values are right. Those checks belong to the receiving system.

How do I find the problem when validation fails? The error names the problem in plain words, for example an unexpected character or a missing comma, rather than leaving you with a position number and no explanation. Fix what it names, then validate again.

Is my JSON uploaded to a server for validation? No. The formatter and validator run fully locally in your browser. The JSON you paste never leaves your device, so it is safe to validate payloads with internal or test data.

Conclusion

Conversions fail quietly and downstream. One Validate-only pass at the end of the chain catches the trailing commas, stray quotes and leftover comments while you can still fix them, without changing a character of the file you are about to send. Run it after every conversion, and treat a pass for exactly what it is: proof of syntax, not correctness. The same philosophy applies at the start of the chain, in our companion guide on cleaning up raw database output before exporting. For more guides in this series, see our Data and JSON Tools guides.

References