JSON Formatter

Format, validate, minify, and inspect JSON directly in your browser.

Status

Valid

Root type

Object

Nodes

7

Size

128 B

Input JSON

Output

{
  "project": "Mowatool",
  "locale": "en",
  "calculators": [
    "compound-interest",
    "percent-calculator"
  ],
  "published": true
}

Related calculators

What is the JSON formatter and validator?

This browser tool formats, minifies, validates, visualizes, compares, and converts JSON. The source page targets backend developers, frontend developers, DevOps engineers, data analysts, product planners, QA engineers, and anyone handling API or configuration data.

Formatting, validation, and tree view

Pretty print and minify

  • Pretty print expands compressed or one-line JSON with 2 spaces, 4 spaces, or tabs.
  • Keys can be sorted alphabetically, and Unicode escape sequences such as \\uXXXX can be decoded for readability.
  • Minify removes whitespace and line breaks to reduce payload size for API requests or storage.
  • The tool reports compression rate compared with the original text.

Validation behavior

  • Validation runs as users type and reports the line number plus an understandable error message.
  • Common mistakes include missing braces or colons, trailing commas, single quotes, comments, and duplicate keys.
  • JSON requires double quotes around object keys and string values; single quotes and backticks are not valid JSON.
  • Leading-zero numbers such as 012, hexadecimal 0xFF, Infinity, NaN, and undefined are not valid JSON values.

Tree, diff, and conversion

  • Tree view lets users collapse and expand nodes, color-codes strings, numbers, booleans, null, objects, and arrays, and copies JSONPath on node click.
  • JSON diff compares semantic structure regardless of key order, marking additions, deletions, and changes.
  • Converters can generate TypeScript interfaces, CSV, YAML, XML, and URL query strings.
  • Keyboard shortcuts include Ctrl+Shift+F for formatting, Ctrl+Shift+M for minify, Ctrl+Shift+C for copy, and Ctrl+L for clearing input; Mac users can use Cmd equivalents.

Privacy and large files

Practical limits

  • All processing happens in the browser; JSON input is not sent to the server.
  • Normal files of a few MB are supported smoothly, while very large JSON over 10 MB can become slow depending on browser performance.
  • Recent 10 items are stored in local storage, and browser-data deletion removes the history.
  • CSV conversion is best for arrays of objects; nested objects and arrays are included as JSON strings.