JSON Formatter & Validator
Paste raw JSON to format, validate, or minify it instantly. Errors show the exact line and column.
Input0 chars · 0 lines
What is JSON?
JSON (JavaScript Object Notation) is a lightweight data interchange format that's easy for both humans and machines to read. It's the standard for REST APIs, configuration files, and data storage across nearly every programming language.
Common JSON validation errors
- Trailing commas
-
JSON does not allow a comma after the last item in an object or array.
{"name": "test",}is invalid — remove the trailing comma. - Single quotes
-
JSON requires double quotes for strings.
{'name': 'test'}is invalid — use"name": "test"instead. - Unquoted keys
-
All object keys must be double-quoted strings.
{name: "test"}is invalid — use"name": "test". - Missing commas
- Every element in an array or property in an object must be separated by a comma. A missing comma between values will trigger an "unexpected token" error.
- Unescaped special characters
-
Control characters, backslashes, and double quotes inside strings must be escaped.
For example, a literal tab should be
\tand a newline should be\n.
Keyboard shortcut
Press Ctrl+Enter (or Cmd+Enter on Mac) while the input is focused to format instantly.