JSON Formatter
Pretty-print or minify JSON without changing a single value.
Your result will appear here
Fill in the details on the left and press the button. You will see the answer right here, without the page reloading.
About this tool
Paste JSON to get it indented and readable, or squeezed onto one line. Unlike tools that decode and re-encode, this one only changes spacing: numbers such as 1.10 or 12345678901234567890, \u escapes and the order of keys stay exactly as written. A mistake is reported with its line and column. Your text is processed for this request only and is never stored.
Frequently asked questions
What does formatting JSON do?
It adds indentation and line breaks so that the data is easy to read. The data itself does not change.
Why do I get an error?
The JSON is probably invalid: a missing comma, single quotes, a trailing comma or an unquoted key are the usual causes. See our guide to common JSON errors.
Is it safe to paste my JSON here?
Avoid pasting passwords, private keys or personal data into any online tool.
Guides and tutorials
How to Test REST APIs Online (A Beginner Guide)
Learn what an API request is made of, how to send one and how to read the response, using the free API Tester.
Read the guide → Developer guides2 min readHow to Fix the Most Common JSON Syntax Errors
Missing commas, single quotes and trailing commas: the mistakes behind most "Unexpected token" errors and how to fix them.
Read the guide → Developer guides2 min readJSON Formatting Explained With Examples
What JSON is, how its syntax works and why formatting a messy JSON string makes it so much easier to read and debug.
Read the guide →