RichScriptsTools for a Smarter WebDEVELOPER TOOLS / JSON

JSON Formatter

Format, validate, and minify. Your JSON stays in your browser.

2 MiB maximum
Ready when you are
Ctrl / ⌘ + Enter to format

Paste JSON or open a file to get started.

Format JSON online, without a round trip

This free JSON formatter turns compact API responses, configuration files, and exported data into readable text. Paste a document or open a local JSON file, choose two spaces, four spaces, or tabs, then select Format JSON. Indented objects and arrays make nested relationships easier to follow while you review payloads or troubleshoot an integration.

Validate, beautify, and minify

Use Validate to check JSON syntax without generating a new output. Invalid input produces a diagnostic from your browser’s JSON parser; the exact wording and location information depend on the browser. Minify removes unnecessary whitespace outside strings for a compact document. Copy the result to your clipboard or download it as an application/json file for use in an editor, request body, or project.

Keep the original data intact

Formatting changes whitespace rather than rewriting parsed values. Original number spellings, large integer digits, escaped characters, object key order, and duplicate keys remain intact. Strings containing braces or commas stay untouched. Any valid top-level JSON value is supported, including arrays, strings, numbers, booleans, and null. Clear removes both editor values from the page.

Frequently asked questions

Is my JSON uploaded or saved?

No. Formatting, validation and file reading happen in your browser. This page does not send your JSON to a server or save it in browser storage. Copy and download only run when you choose them.

Does formatting change large numbers or duplicate keys?

No. The formatter preserves original number tokens, string escapes, key order and duplicate keys. It changes only whitespace outside strings. Duplicate keys remain ambiguous for downstream applications, so avoid them when exchanging data.

Can I format JSON with comments or trailing commas?

No. This tool validates strict JSON. Remove comments and trailing commas, use double quotes around keys and strings, and replace JavaScript-only values such as undefined or NaN before formatting.

What are the size limits?

Input is limited to 2 MiB of UTF-8 text, with a maximum nesting depth of 200 and output limited to 8 MiB. These limits keep browser processing manageable. Split larger documents before using the formatter.