JSON Format Examples & Templates
Browse common JSON format examples and templates. Copy any example directly into the formatter above to experiment with formatting, validation, and minification.
API response example
A typical REST API response wraps data in a standard envelope: { "status": "success", "data": { "id": 1, "name": "John Doe", "email": "john@example.com", "roles": ["admin", "user"] }, "meta": { "page": 1, "total": 42 } }. This pattern separates data from metadata and provides a consistent structure for clients.
Configuration file example
JSON is widely used for configuration: package.json (Node.js), tsconfig.json (TypeScript), .eslintrc.json (ESLint), and settings.json (VS Code). These files typically use nested objects with string, number, boolean, and array values to define application behavior.
Nested data structures
JSON supports arbitrary nesting of objects and arrays. Common patterns include arrays of objects (database rows), nested objects (hierarchical data), and mixed structures (API responses with pagination). The formatter handles any nesting depth with proper indentation.
Frequently Asked Questions
What data types does JSON support?
JSON supports six data types: strings (double-quoted), numbers (integer or floating-point), booleans (true/false), null, objects (key-value pairs), and arrays (ordered lists).
What is the maximum size of a JSON file?
JSON has no specification-defined size limit. Practical limits depend on the parser and available memory. Most APIs limit request bodies to 1–10 MB. This browser-based tool handles files up to several megabytes comfortably.