D
Devault

JSON Formatter

Format, validate, and minify JSON — 100% local processing

Input
Output
⌘↵ to format

About JSON Formatter

JSON (JavaScript Object Notation) is the default data format for web APIs, configuration files, and log output. Minified JSON is compact for machines but hard for people to read, and a single missing comma or quote can make a whole document invalid.

The formatter parses your input with the browser's built-in JSON parser. If the document is valid, it re-prints it with consistent indentation so nesting is easy to follow; if it is invalid, it shows the parser's error message so you know what to fix. You can also minify JSON to strip whitespace before sending it over the network or embedding it in code.

Common use cases

  • Inspecting an API response copied from browser dev tools or curl.
  • Finding the syntax error in a hand-edited config file.
  • Minifying a payload before pasting it into a request body or environment variable.
  • Making a diff-friendly, consistently indented version of a JSON file.

Frequently asked questions

Why does my JSON fail to parse?
The most common causes are trailing commas, single quotes instead of double quotes, unquoted keys, and comments. Standard JSON allows none of these.
Does formatting change my data?
No. Only whitespace changes. Keys, values, and ordering stay the same. Very large numbers can lose precision because they are parsed as JavaScript numbers.
Is it safe to paste production data here?
The formatting happens in your browser and the input is not uploaded. See the privacy policy for the full details.