Skip to content
Developer tools · JSON

JSON Formatter & Validator

Format, validate and repair JSON with exact error locations, query it with JMESPath, convert to YAML, CSV or DynamoDB JSON, and check AWS payload limits.

Last updated · shared JSON engine: exact big numbers, repair, AWS-aware

Developer Tools
JSON Formatter
& Validator

The most complete free JSON tool. Format, minify, validate, and analyse any JSON instantly — with syntax highlighting, precise error detection, path explorer, and live statistics.

Format & beautify with custom indent (2, 4 spaces or tabs) Minify JSON to the smallest possible size Validate with exact error location & fix suggestions Syntax highlighting — keys, strings, numbers, booleans Path explorer: browse every key/value with dot-notation paths Live stats: depth, keys, arrays, size, type counts One-click repair: comments, trailing commas, single quotes, bare keys JMESPath queries (aws --query), YAML, CSV and DynamoDB JSON conversion JSON Schema generate & validate, AWS payload-limit checks Big numbers kept exact, duplicate keys flagged
// JSON Summary
JSON Input & Output
Input JSON 0 chars
Samples:
Output  0 chars
Formatted output will appear here…
⚠ JSON Parse Error
Message
Position
Context
Fix hint
JSON Data Types Reference
TypeExampleNotes
String"Hello, world"Must use double quotes
Number42, 3.14, -1e5Integer or float, no quotes
Booleantrue, falseLowercase only
NullnullRepresents absence of value
Object{"key": "value"}Unordered key-value pairs
Array[1, "two", true]Ordered list of any values
Common JSON Errors & Fixes
ErrorCauseFix
Unexpected tokenInvalid characterCheck for single quotes, trailing commas
Unexpected endUnclosed bracket/braceCount opening/closing {[
Trailing commaComma after last itemRemove comma before } or ]
Single quotesUsed instead of doubleReplace 'key' with "key"
CommentsJSON has no commentsRemove // … or /* … */
Unquoted keysJS style not validAdd double quotes around keys
NaN / InfinityNot valid JSON valuesUse null or a number string

JSON Formatting & Validation Guide

JSON (JavaScript Object Notation) is the universal data interchange format used by virtually every web API, configuration file, and database. Properly formatted JSON is easier to read, debug, and maintain. Valid JSON follows the RFC 8259 standard — strict rules about syntax that differ from JavaScript object literals.

What is the difference between JSON format and JSON validation?
JSON formatting (beautifying) adds consistent indentation and line breaks to make JSON human-readable, without changing the data. JSON validation checks whether the text is syntactically correct according to RFC 8259 — for example, verifying all keys are quoted, no trailing commas, and all brackets are properly closed. A JSON file can be valid but poorly formatted, or invalid and need fixing before it can be parsed.
Why do trailing commas cause JSON errors?
Unlike JavaScript, JSON strictly forbids trailing commas — a comma after the last element in an object or array. For example, {"name":"Alice",} is invalid JSON. This is a common mistake when manually editing JSON. Most parsers throw "Unexpected token }" or "Unexpected token ]". The fix is simply to remove the comma before the closing bracket or brace.
What is JSON minification and when should I use it?
JSON minification removes all unnecessary whitespace (spaces, tabs, newlines) to produce the smallest possible valid JSON string. This reduces file size and bandwidth for API responses, configuration storage, and data transfer. For a 10KB formatted JSON file, minification typically reduces it by 30–50%. Use minified JSON in production APIs; keep formatted JSON for configuration files humans need to read and edit.
Can JSON contain comments?
No — standard JSON (RFC 8259) does not support comments. Formats such as JSON5 and JSONC (used by VS Code settings) allow them, and YAML supports # comments. If you paste JSON with // or /* */ comments here, the Repair button removes them (along with trailing commas, single quotes and unquoted keys) and lists every change it made.
What is a JSON path and how do I query JSON?
A JSON path is a dot-notation expression that identifies a specific value within a JSON structure. For example, in {"user":{"name":"Alice","scores":[95,87]}}, the path user.name returns "Alice" and user.scores[0] returns 95. JSONPath (RFC 9535) extends this with wildcards ($..name), filters, and recursive descent. Paths are used in APIs, database queries (MongoDB, PostgreSQL jsonb), and tools like jq. The AWS CLI uses JMESPath for --query — you can test JMESPath expressions in the Query tab of the workbench below the editor.
What is the maximum JSON nesting depth?
RFC 8259 lets parsers set their own nesting limit. Recursive parsers are limited by the call stack — Python's json module, for example, fails at roughly the interpreter's recursion limit (about 1,000 levels by default). This tool accepts up to 5,000 levels. Real-world data rarely goes beyond 10–15 levels; if yours does, flattening the structure usually makes it easier to query.
Practical guide

How to format, fix and check JSON

Paste JSON or drop a file. The tool formats it as you type (up to 500 KB, larger on Ctrl+Enter), shows the exact line and column of any error, and fills the tree, table, statistics and path explorer.

When the JSON is broken

Most "invalid JSON" comes from text copied out of code, logs or chat. Click Repair automatically in the error banner, or Repair JSON in the workbench. It fixes:

  • //, /* */ and # comments, and trailing commas;
  • single or curly quotes, and unquoted keys;
  • Python True/False/None, and NaN/Infinity;
  • missing commas between lines, unclosed brackets, and a JavaScript const x = prefix.

Every change is listed, and Undo puts your original text back.

Things a normal formatter gets wrong

  • Big numbers. JavaScript can only hold integers up to 9,007,199,254,740,991 exactly. Most online formatters silently round larger IDs (DynamoDB numbers, Snowflake-style IDs, some account and order numbers). This tool keeps every digit in the formatted output and tells you when a number is that large, because Lambda (Node.js) and many SDKs will round it too.
  • Duplicate keys. {"Effect":"Allow","Effect":"Deny"} is accepted by most parsers, which keep only the last value. The tool flags every duplicate with its path and line.

Workbench

  • Repair & clean: sort keys, unwrap JSON hidden inside strings (common in SQS, SNS, EventBridge and CloudWatch messages), remove nulls, escape or unescape a JSON string, and decode the gzip + base64 awslogs.data field of a CloudWatch Logs subscription event.
  • Query (JMESPath): the same language as aws … --query. Test the expression here, then copy the CLI form.
  • Convert: JSON ⇄ YAML (CloudFormation short tags such as !Ref, !Sub and !GetAtt are understood), JSON → CSV, and DynamoDB JSON ⇄ plain JSON (including get-item/scan output).
  • JSON Schema: generate a draft 2020-12 schema from a sample, or validate the input against your schema. It checks the commonly used keywords and lists any it skipped.
  • AWS checks: recognises contact flows, IAM and S3 policies, CloudFormation, CTRs, EventBridge and Lambda events, and links to the matching KloudMint tool. It also compares the minified size with AWS payload limits (checked 17 October 2026):
    • Amazon Connect contact attributes: 32 KB;
    • Step Functions: 256 KiB;
    • SNS: 256 KB;
    • DynamoDB item: 400 KB;
    • Lambda async, SQS and EventBridge: 1 MB;
    • Lambda sync: 6 MB;
    • API Gateway REST: 10 MB.

Nothing you paste leaves your browser. The JMESPath and YAML libraries load from this site only when you use those tabs.

Official references

Runs 100% in your browser. Your files and data never leave your machine. Nothing is uploaded or stored.

Need a hand with your AWS setup?

Get help from an AWS architect who builds and runs contact centre and AI workloads: IAM, data pipelines, Bedrock and cost reviews.