Help
  • Preserves high-precision numbers
  • Auto-detects and formats DICT input as JSON
  • Auto-corrects escaped or malformed JSON

JSON Formatter

This free online JSON formatter formats and visualizes JSON, supports collapsing/expanding nodes and copying/deleting sections — and can minify it in one click.

Supports high-precision numbers (BigInteger, BigNumber, BigDecimal) and auto-fixes common JSON syntax errors.

All tools on this site run entirely in your browser locally. No data is uploaded to any server.

Common issues that can be repaired:

  • Missing quotes: unquoted keys or string values, e.g. {name: "John"}
  • Missing commas: commas omitted between object or array elements
  • Trailing commas: an extra comma after the last element
  • Single quotes: single quotes used instead of double quotes, e.g. {'name': 'John'}
  • Special quotes: special characters such as Chinese curly quotes “”‘’
  • Comments: /* ... */ or // ... comment blocks
  • Truncated JSON: content cut off, leaving brackets/quotes unclosed
  • Python constants: None/True/False converted to null/true/false
  • Escaped strings: redundant escape characters, e.g. {\"key\": \"value\"}
  • JSONP: a callback({...}) wrapper around the JSON
  • Code block markers: ```json ``` fences
  • Ellipsis: ... placeholders in arrays/objects
  • Multi-line JSON: multiple newline-separated JSON entries merged into an array

Options:

  • Sort JSON: Sort by key names
  • Minify JSON: Remove spaces and line breaks
  • Escape JSON: Escape JSON strings
  • JSON to DICT: Convert JSON to Python dict

Common uses:

  • Formatting and beautifying JSON for reading and debugging
  • Sorting JSON key-values for easy viewing
  • Compressing JSON to reduce transfer size