What does "pretty print" mean?
Pretty-printing is the general programming term for rendering a data structure in a clean, human-readable layout instead of a compact machine-friendly form. For JSON, that means adding indentation, line breaks, and consistent spacing around brackets and colons.
How to use this tool
- Paste your JSON into the left-hand box.
- Choose 2 spaces, 4 spaces, or tab indentation.
- Click Pretty Print JSON.
Frequently asked questions
What's the difference between pretty-printing and formatting JSON?
They're the same operation, described two ways — 'pretty-print' comes from the programming term for rendering data structures in a readable layout (like Python's pprint or JSON.stringify(obj, null, 2) in JavaScript).
Can I choose the indentation width?
Yes — 2 spaces, 4 spaces, or a tab character, matching the most common code style conventions.
Does this replace JSON.stringify(obj, null, 2) in my code?
This tool is for quickly viewing JSON you already have (from a log, response, or file) without writing any code. For pretty-printing JSON inside your own application, you'd still use JSON.stringify with an indent argument.
