Looking for JSON sample data to test your applications, learn JSON structure, or develop mock APIs? This comprehensive guide provides 50+ real-world JSON examples covering everything from simple objects to complex nested structures.
Each example includes practical use cases and is ready to copy and use in your projects. Whether you're testing a JSON formatter, building a REST API, or learning what JSON is, these samples will help you get started quickly.
Quick Access: Looking for just the JSON samples without explanations? Visit our direct sample JSON page for copy-ready examples with one-click access.
Why Use Sample JSON Data?
Sample JSON data serves multiple purposes in software development and testing:
Testing & Development
Mock data for testing APIs, frontend applications, and data processing pipelines without real data.
Learning & Education
Understand JSON structure, practice parsing, and learn data modeling with realistic examples.
Tool Validation
Test JSON validators, formatters, and converters with various data structures and edge cases.
Documentation
Create clear API documentation with realistic request/response examples for developers.
Basic JSON Examples
Let's start with simple JSON structures that are perfect for beginners and basic use cases.
1. Simple User Profile
Basic user information with common fields.
{ "userId": 12345, "username": "john_doe", "email": "john.doe@example.com", "firstName": "John", "lastName": "Doe", "age": 28, "isActive": true, "role": "user" }
Use case: User authentication, profile management, account systems
2. E-commerce Product
Product data for online stores and catalogs.
{ "productId": "PROD-2024-001", "name": "Wireless Bluetooth Headphones", "category": "Electronics", "price": 79.99, "currency": "USD", "inStock": true, "quantity": 145, "rating": 4.5, "brand": "AudioTech" }
Use case: E-commerce platforms, inventory management, product catalogs
3. Address Information
Standard address format for shipping and contact information.
{ "street": "123 Main Street", "city": "San Francisco", "state": "CA", "zipCode": "94102", "country": "USA", "type": "residential" }
Use case: Shipping systems, contact forms, location services
JSON Array Examples
Arrays in JSON hold multiple values and are essential for lists and collections. Learn more about JSON arrays.
4. List of Users
Multiple user records in an array.
{ "users": [ { "id": 1, "name": "Alice Johnson", "email": "alice@example.com", "role": "admin" }, { "id": 2, "name": "Bob Smith", "email": "bob@example.com", "role": "user" }, { "id": 3, "name": "Charlie Brown", "email": "charlie@example.com", "role": "moderator" } ], "total": 3 }
Use case: User management systems, admin dashboards, team directories
5. Product Catalog
Collection of products with pricing and availability.
{ "products": [ { "id": "P001", "name": "Laptop", "price": 999.99, "inStock": true }, { "id": "P002", "name": "Mouse", "price": 29.99, "inStock": true }, { "id": "P003", "name": "Keyboard", "price": 79.99, "inStock": false } ] }
Use case: Shopping carts, product listings, inventory APIs
Nested JSON Examples
Real-world applications often use nested JSON structures to represent complex relationships and hierarchies.
6. User Profile with Nested Address
User object containing nested address and contact information.
{ "userId": 1001, "name": "Sarah Williams", "email": "sarah.w@example.com", "address": { "street": "456 Oak Avenue", "city": "Portland", "state": "OR", "zipCode": "97201", "country": "USA" }, "phone": { "home": "+1-503-555-0123", "mobile": "+1-503-555-0124" }, "preferences": { "newsletter": true, "notifications": false, "language": "en" } }
Use case: Customer relationship management, account profiles, registration systems
7. E-commerce Order with Items
Complete order structure with customer, items, and payment details.
{ "orderId": "ORD-2025-12345", "orderDate": "2025-01-15T10:30:00Z", "customer": { "customerId": 5678, "name": "Michael Chen", "email": "michael.chen@example.com" }, "items": [ { "productId": "PROD-001", "name": "Wireless Mouse", "quantity": 2, "price": 29.99 }, { "productId": "PROD-002", "name": "USB Cable", "quantity": 3, "price": 9.99 } ], "shipping": { "method": "Express", "cost": 15.00, "address": { "street": "789 Pine Street", "city": "Seattle", "state": "WA", "zipCode": "98101" } }, "payment": { "method": "credit_card", "last4": "4242", "status": "paid" }, "subtotal": 89.95, "tax": 8.10, "total": 113.05, "status": "processing" }
Use case: Order management, e-commerce platforms, invoice systems
8. Company with Departments and Employees
Organizational hierarchy with nested departments and staff.
{ "companyId": "COMP-2025", "name": "TechCorp Inc.", "founded": 2010, "headquarters": { "city": "San Francisco", "state": "CA", "country": "USA" }, "departments": [ { "departmentId": "DEPT-001", "name": "Engineering", "manager": "Jane Smith", "employees": [ { "employeeId": "EMP-101", "name": "David Lee", "position": "Senior Developer", "salary": 120000 }, { "employeeId": "EMP-102", "name": "Emma Wilson", "position": "DevOps Engineer", "salary": 110000 } ] }, { "departmentId": "DEPT-002", "name": "Marketing", "manager": "Robert Johnson", "employees": [ { "employeeId": "EMP-201", "name": "Lisa Anderson", "position": "Marketing Manager", "salary": 95000 } ] } ], "totalEmployees": 3 }
Use case: HR systems, organizational charts, employee management
API Response Examples
These samples mimic real API responses from popular services, perfect for testing API clients and mock servers.
9. REST API Success Response
Standard API response with status, message, and data payload.
{ "status": "success", "statusCode": 200, "message": "Data retrieved successfully", "data": { "userId": 12345, "username": "john_developer", "email": "john@example.com", "createdAt": "2024-01-15T08:30:00Z" }, "meta": { "timestamp": "2025-01-15T12:00:00Z", "requestId": "req-abc123", "version": "v1" } }
Use case: REST API responses, success messages, data retrieval endpoints
10. REST API Error Response
Error response with details for debugging and error handling.
{ "status": "error", "statusCode": 404, "message": "Resource not found", "error": { "code": "RESOURCE_NOT_FOUND", "details": "User with ID 99999 does not exist", "field": "userId" }, "meta": { "timestamp": "2025-01-15T12:00:00Z", "requestId": "req-xyz789" } }
Use case: Error handling, API validation, debugging systems
11. Paginated API Response
List response with pagination metadata for large datasets.
{ "status": "success", "data": [ { "id": 1, "title": "First Blog Post", "author": "Alice" }, { "id": 2, "title": "Second Blog Post", "author": "Bob" } ], "pagination": { "currentPage": 1, "totalPages": 10, "pageSize": 2, "totalItems": 20, "hasNextPage": true, "hasPreviousPage": false }, "links": { "self": "/api/posts?page=1", "next": "/api/posts?page=2", "last": "/api/posts?page=10" } }
Use case: List endpoints, data tables, infinite scroll implementations
Weather & Location Data
12. Weather API Response
Weather information with current conditions and forecast.
{ "location": { "city": "New York", "country": "USA", "coordinates": { "latitude": 40.7128, "longitude": -74.0060 } }, "current": { "temperature": 72, "temperatureUnit": "F", "condition": "Partly Cloudy", "humidity": 65, "windSpeed": 10, "windDirection": "NW", "lastUpdated": "2025-01-15T14:30:00Z" }, "forecast": [ { "date": "2025-01-16", "high": 75, "low": 68, "condition": "Sunny" }, { "date": "2025-01-17", "high": 70, "low": 65, "condition": "Rainy" } ] }
Use case: Weather apps, location services, environmental monitoring
13. Restaurant Information
Business location data with ratings and contact details.
{ "placeId": "place-12345", "name": "The Garden Cafe", "category": "Restaurant", "cuisine": ["Italian", "Mediterranean"], "rating": 4.6, "reviewCount": 342, "priceLevel": "$$", "address": { "street": "123 Garden Street", "city": "Boston", "state": "MA", "zipCode": "02101" }, "contact": { "phone": "+1-617-555-0100", "website": "https://gardencafe.example.com", "email": "info@gardencafe.example.com" }, "hours": { "monday": "11:00 AM - 10:00 PM", "tuesday": "11:00 AM - 10:00 PM", "wednesday": "11:00 AM - 10:00 PM", "thursday": "11:00 AM - 11:00 PM", "friday": "11:00 AM - 11:00 PM", "saturday": "10:00 AM - 11:00 PM", "sunday": "10:00 AM - 9:00 PM" }, "amenities": ["Outdoor Seating", "WiFi", "Parking"], "isOpen": true }
Use case: Location apps, review platforms, directory services
Social Media & Blog Data
14. Blog Post with Comments
Blog article with metadata, content, and user comments.
{ "postId": "post-2025-001", "title": "Getting Started with JSON", "author": { "authorId": 42, "name": "Jane Developer", "avatar": "https://example.com/avatars/jane.jpg" }, "content": "JSON is a lightweight data format...", "excerpt": "Learn the basics of JSON in this comprehensive guide", "publishedDate": "2025-01-15T09:00:00Z", "tags": ["JSON", "Tutorial", "Web Development"], "categories": ["Programming", "Education"], "viewCount": 1523, "likes": 89, "comments": [ { "commentId": 1, "author": "John Reader", "content": "Great article! Very helpful.", "timestamp": "2025-01-15T10:30:00Z", "likes": 5 }, { "commentId": 2, "author": "Sarah Learner", "content": "Thanks for the clear explanation!", "timestamp": "2025-01-15T11:15:00Z", "likes": 3 } ] }
Use case: Blog platforms, CMS systems, content management
15. Social Media Post
Social media content with engagement metrics.
{ "postId": "social-post-789", "user": { "userId": "user-456", "username": "tech_enthusiast", "displayName": "Tech Enthusiast", "verified": true, "profilePicture": "https://example.com/profiles/tech.jpg" }, "content": { "text": "Just deployed my new web app! Check it out ", "media": [ { "type": "image", "url": "https://example.com/images/app-screenshot.jpg", "alt": "App screenshot" } ], "hashtags": ["#WebDev", "#JavaScript", "#Coding"], "mentions": ["@developer_friend"] }, "engagement": { "likes": 245, "comments": 18, "shares": 32, "views": 1840 }, "timestamp": "2025-01-15T15:30:00Z", "visibility": "public" }
Use case: Social networks, feed systems, analytics dashboards
Configuration & Settings
16. Application Configuration
Application settings and feature flags.
{ "appName": "MyWebApp", "version": "2.0.1", "environment": "production", "features": { "darkMode": true, "notifications": true, "analytics": true, "betaFeatures": false }, "api": { "baseUrl": "https://api.example.com", "timeout": 5000, "retryAttempts": 3 }, "security": { "enableHttps": true, "sessionTimeout": 3600, "maxLoginAttempts": 5 }, "ui": { "theme": "light", "language": "en", "itemsPerPage": 20 } }
Use case: App configuration, feature toggles, environment settings
17. User Preferences & Settings
User-specific configuration and preferences.
{ "userId": 12345, "preferences": { "notifications": { "email": true, "push": true, "sms": false, "frequency": "daily" }, "privacy": { "profileVisibility": "friends", "showOnlineStatus": true, "allowTagging": true }, "display": { "theme": "dark", "fontSize": "medium", "language": "en-US", "timezone": "America/New_York" }, "accessibility": { "highContrast": false, "screenReader": false, "reduceMotion": false } }, "lastUpdated": "2025-01-15T10:00:00Z" }
Use case: User settings, preference management, personalization
How to Use These JSON Samples
Testing Our Tools
- •Use JSON Formatter to beautify and validate these samples
- •Convert to tables with our JSON to Table converter
- •Test JSON validation with complex structures
- •Convert to other formats using JSON to CSV or JSON to XML
Development & Testing
- •Use with API testing tools for mock responses
- •Create mock data for frontend development
- •Test database operations and data models
- •Practice JSON.parse() and JSON.stringify()
Learning & Education
- •Study JSON structure and syntax patterns
- •Learn about nested objects and arrays
- •Understand real-world data modeling
- •Practice working with different data types
Need Quick Access to JSON Samples?
Visit our direct sample JSON page for instant access to all these examples with one-click copy functionality. Perfect for quick testing and development!
Best Practices for JSON Sample Data
1. Use Realistic Data
Sample data should mirror real-world scenarios to catch edge cases during testing.
2. Include Edge Cases
Test with null values, empty arrays, special characters, and boundary conditions.
3. Follow Consistent Structure
Maintain consistent naming conventions (camelCase, snake_case) and data types throughout.
4. Document Your Samples
Add comments or documentation explaining the purpose and structure of each sample.
5. Validate Before Use
Always validate your JSON samples with a JSON validator before using them in production.
Conclusion
These sample JSON examples provide a solid foundation for testing, development, and learning. Whether you're building APIs, testing data parsers, or learning JSON structure, these real-world samples will help you work more efficiently.
Remember to check out our direct sample JSON page for quick access to all examples, or explore our other tools: