Como usar: Formatador de JSON
- 1Paste or type your JSON.
- 2Click Format to beautify it, choosing 2 spaces, 4 spaces or tabs, or click Minify to compress it.
- 3If the JSON is invalid, jump to the reported line and column to fix it.
- 4Copy the result or download it as a .json file.
Principais recursos
Beautify with your preferred indent
Format JSON with 2 spaces, 4 spaces or tabs to match your project's style.
Minify
Remove all unnecessary whitespace to make JSON as compact as possible for configs, API payloads or storage.
Validation with error position
Invalid JSON produces a clear error with the line and column where parsing failed, such as a missing comma or an unquoted key.
Sort keys alphabetically
Order object keys A to Z, which makes large objects easier to scan and two JSON files easier to compare.
Copy or download
Copy the output to your clipboard or save it as a .json file. Your data is processed in the browser and never uploaded.
JSON (JavaScript Object Notation) is the most common format for exchanging data between web services, and it's used for many configuration files. It's simple but strict: keys must be in double quotes, strings must use double quotes, and trailing commas and comments aren't allowed. A single misplaced character makes the whole document invalid.
Formatting turns a dense, single-line API response into an indented structure where nesting is easy to follow. Minifying does the opposite, stripping whitespace to save space. Validation tells you whether a parser will accept the text and, if not, exactly where it stopped, which is far faster than hunting through hundreds of lines by eye.
Sorting keys is a handy trick when comparing two JSON files: once both are formatted and sorted the same way, a regular text diff shows only the real differences rather than changes in key order.