How to Format JSON Online
Published August 9, 2026 · 3 min read
JSON returned by an API or saved from a config file is often a single dense line. Formatting it adds indentation and line breaks so you can actually read the structure.
Steps to format JSON
- Paste the JSON into the JSON formatter.
- Click Format to add indentation, or Minify to remove it again.
- Click Validate to check the syntax without changing anything.
- Copy the result or download it as a file.
Common JSON mistakes
- Missing commas between properties or array items.
- Single quotes instead of double quotes around strings and keys.
- Trailing commas after the last item in an object or array.
- Unclosed braces or brackets, usually from deleting a chunk of text without checking what it removed.
When the formatter finds a problem, it points to the line and column where parsing failed, which is usually right at or just after the actual mistake.
Format vs. minify
Formatting is for reading and editing. Minifying strips all the extra whitespace back out, producing the smallest version of the same data, useful when you're sending it over the network or storing it in a database field.
Related articles
How to Encode and Decode URLs
Understand what URL encoding does, when you need it, and how to convert text to and from a URL-safe format.
Read More →How to Create an SEO-Friendly URL Slug
Learn what makes a good URL slug and how to turn a title into a clean, readable, lowercase web address.
Read More →How to Create a QR Code
A quick guide to generating a QR code for a link, WiFi network, or contact card, and downloading it to use anywhere.
Read More →