JSON Formatter

Format, minify, validate, escape, and unescape JSON directly in your browser.

The JSON formatter helps you format and validate JSON data. It can also escape JSON text for embedding inside a string and restore escaped text to its original form.

Loading...

Examples and limits

Formatting {"name":"Alice","items":[1,true]} produces readable multi-line JSON using the selected indentation. Invalid JSON reports a parse error; escape and unescape operate on text and never execute it. Formatting and minifying change only whitespace outside strings, preserving the original spelling of large integers, decimals, exponents, key order, and string escapes. Everything is processed locally.

How to use

  • Format: Validate the JSON and output readable multi-line text using the selected indentation.
  • Minify: Remove unnecessary whitespace and output compact JSON.
  • Validate: Check whether the JSON is valid without changing the result.
  • Escape: Escape quotes, backslashes, and control characters so JSON can be embedded in another JSON string.
  • Unescape: Restore escaped text to the original JSON text.

All processing happens locally in your browser. Your JSON is not uploaded.

Licensed under CC BY-NC-SA 4.0

Report a problem

The links prefill this page's title and address. Add what happened and how to reproduce it.