JSON Formatter & Validator

Format, validate, minify and explore JSON data. Everything runs in your browser -- nothing is sent to a server.

Input

Output

Understanding JSON

What is JSON?

JSON (JavaScript Object Notation) is a lightweight data interchange format. It is easy for humans to read and write, and easy for machines to parse and generate. JSON is language-independent but uses conventions familiar to programmers of the C-family of languages.

JSON Data Types

  • String -- text wrapped in double quotes: "hello"
  • Number -- integer or floating point: 42, 3.14
  • Boolean -- true or false
  • Null -- empty value: null
  • Object -- key-value pairs in curly braces: {"key": "value"}
  • Array -- ordered list in square brackets: [1, 2, 3]

Common Rules

  • Keys must be strings wrapped in double quotes (single quotes are invalid).
  • Trailing commas after the last item in an object or array are not allowed.
  • Comments are not supported in standard JSON.
  • The root value can be any valid JSON type, but objects and arrays are most common.
  • Strings support escape sequences: \" \\ \n \t \uXXXX

Tips for Debugging

If your JSON fails validation, check for: missing or extra commas, unquoted keys, single quotes instead of double quotes, unescaped special characters in strings, or mismatched brackets and braces.

CompareKaro

Add CompareKaro to Home Screen

Quick access to 40+ free tools