This is a free, real-time JSON formatter and validator that runs 100% in your browser. No data is sent to any server. It supports formatting (beautifying), minifying, sorting keys alphabetically, and real-time validation with line-accurate error messages.
JSON.parse() converts your text into an in-memory JavaScript object, then JSON.stringify() renders it back with proper indentation. This also validates the JSON as a side effect " any syntax errors are caught and displayed with the exact character position.
All processing is done entirely in your browser's memory using JavaScript. No data is sent to any server. When you close this tab, the data is gone. This makes it safe to use with API keys, tokens, or private configuration files.
It recursively sorts all object keys alphabetically throughout the entire JSON structure. Useful for comparing two JSON objects for differences or enforcing consistent key ordering in config files.
Minifying removes all whitespace, newlines, and indentation from valid JSON. The result is functionally identical but smaller " useful for reducing payload size in HTTP API responses or configuration files.
Format MongoDB query results and BSON-like JSON documents with proper indentation for debugging and documentation.
MongoDB stores documents in BSON format, which extends JSON with types like ObjectId, Date, and Decimal128. When exported as Extended JSON, these types appear as objects with $ prefixes (e.g., {"$oid": "507f1f77bcf86cd799439011"}).
This tool formats MongoDB Extended JSON documents with proper indentation, making complex document structures with nested subdocuments and arrays readable and navigable.
All processing is client-side — safe for formatting documents containing user records, API keys, or sensitive business data from your MongoDB collections.
Essential for MongoDB developers:
Yes. MongoDB Extended JSON ({"$oid": "..."}, {"$date": "..."}, {"$numberDecimal": "..."}) is valid standard JSON and formats perfectly in this tool. The $ prefixed keys are just regular JSON keys.
BSON is a binary format that cannot be pasted as text. First export your data as Extended JSON using mongoexport --jsonFormat=canonical or Compass's export feature, then paste the JSON here.
MongoDB automatically generates an _id (ObjectId) for every document as a unique identifier. It appears as {"$oid": "..."} in Extended JSON format and contains an embedded creation timestamp.