JSON Formatter

Make JSON easy to read

FormatMinify
Indent
24Tab

Output

Paste JSON to see the formatted result.

What is JSON Formatter?#

JSON Formatter takes pasted JSON and formats it into a readable shape, with consistent indentation that makes the structure visible at a glance.

When the input has a syntax error, the faulty line and the reason are shown instead of the result. For common slips such as trailing commas or single quotes, a repair option can rewrite the input into valid JSON.

How to Use#

Paste JSON into the input, and the formatted result appears right away. Copy or download it when you want to take it elsewhere.

Indentation, minification, and key sorting apply as soon as they change, so there is nothing else to press.

Formatting Options#

  • Indentation: 2 spaces, 4 spaces, or a tab per level. Applies to pretty-printed output only.
  • Minify: compresses the result into a single line without whitespace. Useful before embedding JSON in code or sending it over the wire.
  • Sort keys: orders object keys from A to Z at every level, comparing by character code so uppercase letters sort before lowercase. Array order never changes, and repeated keys keep their relative order.

Common Use Cases#

  • Reading an API response: paste the body and scan the structure instead of counting braces.
  • Normalizing a config file: line up indentation and key order before saving it back.
  • Checking JSON in logs: isolate one fragment and confirm it parses before digging further.

FAQ#

Notes#

  • Applying the repair replaces the input with the fixed text, so the result can be checked and adjusted in place.
  • Identifiers that must keep exact digits, such as order numbers, are safer as strings.
  • Large inputs can make the page slow while formatting.
  • Formatter
  • Checker

Last updated:

Related tools