Skip to main content

Developer tools

JSON Formatter

Format, validate or minify JSON locally. Preserve large numbers, duplicate keys and string escapes, then copy or download readable JSON without an account.

Find another tool

Search the full directory by task or name.

Browse all 44 tools →

This tool needs JavaScript. If the controls don’t appear, check your connection, enable JavaScript and reload this page.

By customlogic.com.au

How to use this tool

1. Paste valid JSON, using double-quoted property names and no comments or trailing commas. Input is limited to 200,000 characters.

2. Choose readable output with two or four spaces, or compact minified output. Select Format JSON to validate and format.

3. Review the result, then copy it or download a .json file. Editing the source or format clears the earlier output.

Formatting without changing values

The formatter checks JSON syntax and changes only whitespace outside strings. It preserves large number digits, number notation, string escapes, duplicate keys and property order instead of converting the parsed value back to text.

Example

The example includes the integer 9007199254740993. Its exact digits remain intact, including when switching to compact output. Whitespace inside string values is never removed.

Questions and assumptions

What validation covers

Validation checks JSON syntax, not a JSON Schema or the meaning of your data. A standalone string, number, boolean or null is also a valid JSON value. Duplicate object keys are preserved but may be interpreted differently by other software.

Limits

Inputs can contain up to 200,000 characters and 100 levels of nesting. Formatted output is limited to 1,000,000 characters; use compact output or smaller input if indentation would exceed this. JSON strings may contain escaped markup, which is displayed as text and never executed.

Sources and further reading

Built and maintained by Custom Logic. Page updated .