How to format JSON and spot common syntax errors
· Replikhurt Tools
JSON is easier to inspect when each object and array is indented consistently. A formatter can improve readability, but it cannot guess what you intended when the input is invalid.
Know the basic JSON rules
JSON objects use double-quoted property names. String values also need double quotes; numbers, booleans and null do not. Properties are separated by commas. Arrays use square brackets. Valid values include strings, numbers, true, false, null, objects and arrays. JSON does not support comments or trailing commas.
Check common syntax mistakes
Look for a missing comma between properties, an extra comma after the final item, single quotes where double quotes are required, or a bracket that never closes. A parser error usually reports a position; inspect the characters just before that location as well as the position itself.
Separate formatting from validation
Formatting changes whitespace and indentation so the structure is easier to read. Validation checks whether the text can be parsed as JSON. Minifying removes unnecessary whitespace, which can make a payload smaller but less convenient to review. Keep a copy of important input before changing it.
Format or validate in your browser
Paste the data into the JSON Formatter to format or validate it. The page processes the input locally in your browser. Do not paste passwords, access tokens or confidential production data into tools unless you have checked the handling of that specific environment.