Developer tools / JSON

JSON Formatter

Turn dense JSON into readable data, catch syntax errors, or minify it for delivery. Everything stays in this tab.

Runs entirely on your deviceNo uploads, accounts, cookies, or personal tracking.

Input and result

Paste, choose your format, then copy or save.

Paste JSON or try an example to begin.
1. Add your data

Paste JSON or open a local .json file.

2. Choose the result

Format, validate, sort keys, or minify the data.

3. Save it locally

Copy the result or download a clean JSON file.

Practical guide

Format, validate, sort, or minify JSON offline

Paste JSON to make nested data readable, validate its syntax, sort object keys, or create compact output. Processing stays in the browser, which is useful for configuration fragments and API samples that should not be sent to a third-party formatter.

Common uses

  • Locate a syntax error in an API response or configuration file.
  • Normalize indentation before a code review or documentation update.
  • Minify JSON for a fixture, request body, or embedded example.

What to expect

Validation
Invalid input produces an actionable parse error instead of silently changing the value.
Formatting
Choose indentation and optionally sort keys without changing array order.
Export
Copy the result or download a local JSON file after validation succeeds.

Try a concrete example

Input and settings
Paste {"z":2,"a":1}, enable Sort object keys, and select Format JSON.
Expected result
An indented object with "a" before "z". Copy that sorted result into the input before selecting Minify to get {"a":1,"z":2}. Array order stays unchanged.

Limits and alternatives

Comments, trailing commas, and single-quoted keys are not valid JSON. This formatter uses JavaScript numbers: integers beyond Number.MAX_SAFE_INTEGER can lose precision. Represent large identifiers as quoted strings before processing. Duplicate object keys are reduced to their last value by JSON parsing.

Follow a worked example

Compare an invalid example with corrected JSON, then format, sort, and download it.

Fix a trailing comma in JSON, step by step