Diysb Tools

Valideer JSON

Controleer of JSON geldig en correct is geformuleerd.

JSON-hulpmiddelen

Wat is JSON-validatie?

JSON (JavaScript Object Notation) is een lichtgewicht formaat voor gegevensuitwisseling. JSON-validatie zorgt ervoor dat de structuur van de gegevens voldoet aan de JSON-standaard. Een geldig JSON-object moet correcte syntaxis hebben, inclusief dubbele aanhalingstekens voor eigenschapsnamen en correcte nesting van objecten en arrays.

Invoer JSON
Validatieresultaat
Valideer JSON Voorbeelden

Valid JSON Object

This example shows a correctly formatted JSON object. All property names and string values are enclosed in double quotes, and the overall structure is properly balanced with opening and closing braces.

{ "name": "John", "age": 30, "city": "New York" }
{ "name": "John", "age": 30, "city": "New York" }
✅ Valid JSON
✅ Valid JSON

Invalid JSON Missing Quotes

This example demonstrates an invalid JSON object where the property names are not enclosed in double quotes. According to the JSON standard, property names must always be enclosed in double quotes. Omitting the quotes will result in a syntax error.

{ name: "John", age: 30, city: "New York" }
{ name: "John", age: 30, city: "New York" }
❌ Error: Expected property name or '}' in JSON
❌ Error: Expected property name or '}' in JSON

Invalid JSON with Trailing Comma

This example shows an invalid JSON object with a trailing comma after the last key-value pair. In JSON, trailing commas are not allowed because they create ambiguity when parsing the data structure.

{ "name": "John", "age": 30, "city": "New York", }
{ "name": "John", "age": 30, "city": "New York", }
❌ Error: Expected double-quoted property name
❌ Error: Expected double-quoted property name