BOXUNBAOTools
Simplify everyday tasks.Back to website
ToolboxJSON Formatter

JSON Formatter

Runs locally

Format, fold, and convert JSON in your browser.

Quick format ⌘ / Ctrl↵
Text conversion
Conversions use the current output. Edit the input to start over.
JSON inputINPUT
0 characters
OutputOUTPUT
Valid JSONUTF-8 · JSON
Processing happens in this browser. Your data stays on your device.About JSON Diff

How to use

Steps

  1. Paste JSON into the input. Choose 2 or 4 spaces and select Format, or press ⌘ / Ctrl + Enter.
  2. Select Validate to check syntax or Compress to remove structural whitespace. Use the arrows beside output line numbers to fold objects and arrays. The toolbar also lets you expand or collapse all, or choose a depth.
  3. Use Escape or Unescape when a field value needs to travel as a string. Copy result or Download JSON file gives you the complete text.

Example

Paste this example and select Format. The array is indented and the large integer retains its original value.

{"id":9007199254740993123,"items":[{"name":"画报"}]}

Tips

  • Escape adds a layer of JSON string quotes and escapes. Unescape removes one layer at a time. Use the Unicode controls to convert between text and escape sequences.
  • Text conversions apply to the current full output and can be run in sequence. Editing the input starts a new conversion. Folding only affects the display. Copies and downloads include the full text.