BaroBenchYour digital workbenchWorkbench
KOEN한국어로 전환
Your inputs and files are processed in this browser.Ready without an account

JSON formatter & validator

Validate, format and minify JSON with line/column errors, copy and file download.

Processed in this browser · nothing is uploaded

JSON formatting optionsYour source stays unchanged

Source input

Result

Ready when you are

Enter your input and run the tool to see your result here.

Good to know

Use double quotes for keys and strings. Trailing commas and comments are not valid JSON. Choose two/four-space formatting or minification. Key sorting preserves array order. Duplicate keys keep the last value; store large integers as strings to avoid JavaScript precision loss.

For example
{"name":"OpenTool","private":true,"tools":30}
FIELD NOTES

Understand and use your results

Make API responses or JSON configuration readable and locate syntax errors. This formats JSON; it does not validate business rules against a JSON Schema.

How to use it

  1. Paste JSON and choose two-space, four-space or compact output.
  2. Optionally sort keys and run. If parsing fails, check the reported line and column.

Worked example

Input and options
{"b":2,"a":1} (sort keys)
Result or interpretation
{
  "a": 1,
  "b": 2
}

Key sorting also applies to nested objects, while array element order stays unchanged. Compact output removes formatting whitespace, not spaces inside strings.

Can a valid JSON value change during formatting?

Large integers can be rounded by JavaScript number parsing, and duplicate keys keep only the last value. Store exact large identifiers as strings and resolve duplicate keys in the source. Comments, trailing commas and single quotes are not standard JSON. The input limit is 100,000 UTF-16 code units.

Unexpected result? Report a problem

What are you working on?

↑ ↓ navigate · Enter open · Esc close