Learn JSON
Everything you need to master JSON. From basic syntax to advanced validation techniques, plus free datasets for your projects.
JSON Format Rules: The Edge Cases That Actually Bite
An RFC 8259-grounded guide to JSON's real rules: number precision loss, string escapes, duplicate keys, key ordering, top-level values, and BOM traps.
Read articleGetting Started
Common JSON Mistakes and How to Avoid Them
The 20 most common JSON syntax errors developers make, organized by category with examples and fixes.
How to Open JSON Files: A Practical Guide
Open, view, and troubleshoot JSON files on macOS, Windows, and Linux with real commands for jq, Python, VS Code, and browsers โ plus fixes for common errors.
JSON Comments: Why They Don't Exist and How to Work Around It
Learn why JSON doesn't support comments, explore workarounds like JSONC and JSON5, and discover best practices for documenting your JSON files.
Fixing a JSON Syntax Error in Hand-Edited Config Files
Why hand-edited config files throw a JSON syntax error: trailing commas, comments, JSONC vs strict JSON, duplicate keys, BOMs, and how to validate from the CLI.
JSON vs XML: A Migration Guide for SOAP-to-Mobile APIs
Migrating a SOAP/XML API to JSON for a mobile client? Measure payload size, parse cost, and schema needs, then convert XML to JSON with runnable code in JS, Python, and Go.
JSON vs YAML - When to Use Each Format
A practical comparison of JSON and YAML. Learn when to use each format based on your use case, with conversion examples and common pitfalls.
JSON Format Rules: The Edge Cases That Actually Bite
An RFC 8259-grounded guide to JSON's real rules: number precision loss, string escapes, duplicate keys, key ordering, top-level values, and BOM traps.
Advanced Topics
Formatting JSON: When It Helps, When It Hurts
A practical guide to JSON beautifiers: pretty-print for humans, minify for transport, sort keys for diffs, and the lossy gotchas of round-tripping through stringify.
How to Fix 'Unexpected End of JSON Input' Error
Learn what causes the 'Unexpected end of JSON input' error and how to fix it with practical solutions for JavaScript, Python, and other languages.
JSON Number Precision - How Big IDs Silently Corrupt
JSON numbers above 2^53 lose digits and floats drift, silently corrupting IDs and money. Learn why, how to spot it, and the per-language fixes.
How to Read a JSON Parse Error and Find the Position
Decode JSON parse error messages across JavaScript, Python, Go, and Java. Convert byte offsets and char positions to the exact failing line and column.
JSON Schema Validation in Practice: Shape, Not Syntax
Go beyond valid JSON. Build a real JSON Schema incrementally and validate payloads in JavaScript, Python, and Go โ with readable errors and CI tips.
Mastering JSON in JavaScript: An Advanced Guide
An advanced, gotcha-driven guide to JSON in JavaScript: revivers, replacers, toJSON, BigInt, circular refs, structuredClone, safeParse, plus Python and Go.
Parsing Large JSON Files Without Running Out of Memory
Parse multi-gigabyte JSON files without OOM crashes. Stream giant arrays and NDJSON in Node.js, Python, Go, and jq at constant memory usage.
How to Read and Write JSON in Python: Complete Guide
Master JSON in Python with this comprehensive guide. Learn to read, write, parse, and manipulate JSON data using the json module with practical examples.
Unexpected token < in JSON: Fixing fetch() Errors
The error 'Unexpected token < in JSON at position 0' almost always means you called res.json() on an HTML page. Here's how to diagnose and fix it fast.
Free JSON Datasets
Free JSON Datasets
Use these datasets for testing, learning, or in your projects. All datasets are free and open source.
World Airports
Major international airports with IATA codes, locations, and geographic coordinates for travel applications.
Colors
A collection of 35 common colors with names, hex codes, RGB values, and color categories.
ESLint Config
Example ESLint configuration for TypeScript and React projects.
Package.json Example Dataset
Example package.json for Node.js/JavaScript projects with common scripts and dependencies.
Prettier Config
Example Prettier configuration for consistent code formatting.
TypeScript Config
Example tsconfig.json with strict settings for TypeScript projects.
Continents
All seven continents with area, population, country counts, and geographic facts.
World Countries
A curated dataset of 50+ major countries with ISO codes, capitals, regions, populations, and currency information.
CSS Named Colors
All CSS named colors with hex codes and RGB values for web development.
World Currencies
A dataset of 30 major world currencies with codes, symbols, decimal digits, and associated countries.
Chemical Elements
Periodic table elements with atomic numbers, symbols, masses, and categories.
Emoji Categories
Emojis organized by category with unicode characters for emoji pickers.
Emoticons
A collection of classic text emoticons with meanings and categories, perfect for sentiment analysis and chat features.
European Countries
All European countries with capitals, population, EU membership status, and currency information.
File Extensions
A reference dataset of common file extensions with types, MIME types, and descriptions for file handling.
US Holidays
US federal holidays and common observances with dates and types.
HTTP Status Codes
Complete reference of HTTP status codes with messages, categories, and descriptions for web development.
Keyboard Shortcuts
Common keyboard shortcuts for Windows and Mac with categories and actions.
World Languages
Major world languages with ISO codes, native names, speaker counts, and text direction for internationalization.
Lorem Ipsum
Lorem ipsum placeholder text with paragraphs, sentences, words, and fake names for testing.
Mock Comments
Sample comment data for testing discussion features, moderation, and social interactions.
Mock Events
Sample event data for testing calendar features, registrations, and event management.
Mock Notifications
Sample notification data for testing notification systems, read states, and user alerts.
Mock Orders
Sample e-commerce order data for testing order management and fulfillment systems.
Mock Blog Posts
Sample blog post data for testing CMS features, content management, and publishing workflows.
Mock Products
Sample e-commerce product data for testing shopping carts, catalogs, and product management features.
Mock Transactions
Sample financial transaction data for testing banking features and accounting systems.
Mock Users
Sample user data for testing authentication, user management, and CRUD operations in your applications.
Mountains
Famous mountains worldwide with heights, ranges, and first ascent dates for geographic applications.
Movie Genres
Film genres with descriptions and example movies for entertainment applications.
Music Genres
Music genres with origins, parent genres, and subgenres for music applications.
NATO Phonetic Alphabet
NATO phonetic alphabet with letters, code words, pronunciations, and Morse code.
Oceans
The five world oceans with area, depth, and geographic information.
Solar System Planets
All eight planets in our solar system with physical and orbital characteristics.
Programming Languages
A curated collection of popular programming languages with creation year, creator, paradigms, and type system information.
Regex Patterns
Common regular expression patterns for validation with examples and descriptions.
Rivers
Major world rivers with length, drainage area, and geographic information.
NFL Teams
All 32 NFL teams with cities, conferences, divisions, stadiums, and colors.
JSON Edge Cases Test Dataset
Edge cases and special values for testing JSON parsers and validators.
Large Array Test
50-item array for testing pagination, filtering, and list rendering performance.
Validation Test Data
Valid and invalid examples for testing validation rules and form inputs.
World Timezones
A dataset of 31 major world timezones with IANA identifiers, abbreviations, UTC offsets, and DST information.
Units of Measurement
Common units of measurement with symbols, types, and conversion factors.
US State Capitals
All 50 US state capitals with population, founding year, and coordinates.
US States
A comprehensive JSON dataset of all 50 US states with abbreviations, capitals, statehood dates, and bordering states.
World Cities
Major world cities with populations, coordinates, and timezone information for global applications.
Zodiac Signs
All 12 zodiac signs with symbols, elements, and date ranges for astrology applications.
Ready to work with JSON?
Use our free online tools to validate, format, convert, and transform JSON data.