How to use JSON Formatter
- Paste your JSON into the left box.
- Press Format to make it neat and readable, Minify to remove all extra spaces and line breaks, or Validate to only check it.
- If the JSON is not valid, you see the line and column of the problem and a hint. Fix it in the left box and try again.
- Press Copy result or Download .json to use the result.
About this tool
JSON (JavaScript Object Notation) is a text format used by websites, apps and APIs to exchange data. It is easy for computers to read but hard for people when it is squeezed onto one line. Formatting adds line breaks and indentation so you can read it; minifying removes them to make the file smaller.
Valid JSON follows strict rules: text and property names are in double quotes, items are separated by commas with no comma after the last item, and comments are not allowed. The most common mistakes are single quotes, a trailing comma, a missing comma or bracket, and unquoted property names. When the JSON is invalid, this tool shows the line and column reported by your browser and adds a hint when it recognises one of these mistakes.
Everything is checked with your browser’s built-in JSON parser. Two things to keep in mind: whole numbers with more than about 15 digits can be rounded by JavaScript (the tool warns you), and if an object repeats the same key twice, only the last value is kept. Input is limited to 5 MB.
Privacy: This tool runs in your browser. What you type or choose is not sent to a server by this website.
Common questions
What is the difference between format and minify?
Format adds line breaks and indentation for reading. Minify removes them so the data takes less space. The data itself is the same.
Why does it say my JSON is invalid?
Look at the line and column shown. Typical causes are a missing or extra comma, single quotes instead of double quotes, a missing closing bracket, or a comment in the text.
Does the order of keys change?
Only if you tick “Sort object keys A–Z”. Otherwise the order is kept as you typed it.
Is my JSON uploaded?
No. It is parsed in your browser and never sent to a server.