Guides
JSON guides & tutorials
Practical, in-depth guides to working with JSON — from formatting and converting to JSON Schema, JSONPath and JWTs. Every guide is free, example-driven and links straight to the tool that does the job.
21 guides · updated 2026-07-12How-to guides
Step-by-step answers to the JSON tasks you do every day.
How to Format and Beautify JSONA developer's guide to pretty-printing JSON: choosing indentation and formatting in the browser, VS Code, JavaScript, jq, and Python.6 min readHow to Minify JSON (and When You Should)Minifying JSON strips insignificant whitespace to shrink payloads. Learn how it works, when to do it, how it interacts with gzip, and code for JS, Python, and jq.6 min readHow to Fix Common JSON Syntax ErrorsA developer's field guide to the most common JSON syntax errors, with before/after fixes and how to read line and column error messages.8 min readHow to Escape and Unescape JSON StringsA developer's guide to escaping and unescaping JSON strings: required escapes, \uXXXX, embedding JSON in JSON, and how to avoid double-escaping bugs.7 min readHow to Compare Two JSON Files (JSON Diff)Compare JSON files by structure, not text: spot added, removed, and changed keys, ignore key order and array noise, and represent diffs as JSON Patch.8 min readHow to Generate Mock JSON Data for TestingA developer's guide to generating realistic mock JSON data from field specs — with an online generator, faker libraries, seeds, and PII safety.7 min readHow to Sort JSON Keys Alphabetically (and Make JSON Canonical)Sort JSON keys alphabetically for clean diffs and stable hashes — plus why key order is meaningless per RFC 8259 and what canonical JSON really means.7 min read
Concepts & deep-dives
Understand the standards, formats and specs behind JSON.
What Is JSON? A Beginner’s Guide to JavaScript Object NotationA beginner-friendly guide to JSON: what it is, its six value types, a full annotated example, where it's used, and how to read and validate it.6 min readJSON Schema: A Complete Guide with ExamplesLearn JSON Schema draft 2020-12 from the ground up: core keywords, combinators, $ref reuse, and how to generate and validate schemas with real code.7 min readJSONPath Cheat Sheet: Syntax and ExamplesA developer-focused JSONPath reference: root, wildcards, recursive descent, slices, and filters, with a sample document and an expression table.7 min readUnderstanding JWTs: Structure, Claims, and VerificationA developer's guide to JWT structure, registered claims, HS256 vs RS256 signing, verification, and the security mistakes that lead to auth bypasses.8 min readJSON Data Types Explained (with Examples)JSON has exactly six data types. Here's what each one allows, how they map to JavaScript and Python, and the precision and null gotchas that bite in production.8 min readBase64 Encoding Explained: What It Is and How It WorksA clear explanation of Base64: how binary becomes text, the standard and URL-safe alphabets, padding, why it isn't encryption, and when to reach for it.8 min readURL Encoding Explained: Percent-Encoding, %20, and + SignsHow percent-encoding works, why spaces become %20, when + really means a space, and the crucial encodeURIComponent vs encodeURI distinction.8 min read
Format comparisons
JSON versus the other formats — and when to reach for each.
JSON vs YAML: Differences and When to Use EachA developer-focused comparison of JSON and YAML — syntax, comments, anchors, tooling, and security — with clear guidance on when to use each.6 min readJSON vs XML: A Modern ComparisonA developer-focused comparison of JSON and XML — data models, schema validation, parsing, verbosity, and where each format still wins today.8 min readJSON vs CSV: How and When to Convert Between ThemJSON is hierarchical, CSV is tabular. Learn when to use each and how to flatten nested JSON into CSV columns and convert back safely.7 min readJSON5, JSONC, and NDJSON ExplainedA developer's guide to JSON5, JSONC, and NDJSON — what each variant adds, real examples, and why standard parsers reject them.8 min read
JSON in your language
Parse, generate and type JSON in JavaScript, Python and TypeScript.
Working with JSON in JavaScript: parse, stringify, and BeyondMaster JSON in JavaScript: JSON.parse and JSON.stringify in depth, plus reviver/replacer callbacks, dates, BigInt, deep copies, and safe parsing.6 min readWorking with JSON in Python: The json Module GuideMaster Python's built-in json module: parsing, serializing, pretty-printing, the dict-to-JSON type mapping, custom encoders, and reading NDJSON.6 min readHow to Generate TypeScript Types from JSONTurn a JSON sample into TypeScript interfaces: nested objects, arrays, optional props, unions, plus why you still need runtime validation.9 min read