Tool

Online JSON formatter

Format or minify JSON without sending your data to a server.

Your data is processed locally in your browser and is not sent to our servers.

Shortcut: Ctrl or ⌘ + Enter
Read only

Enter JSON and choose an action.

A verifiable example

This compact input:

{ "name": "Ada", "languages": ["JavaScript", "TypeScript"], "active": true }

becomes:

{
  "name": "Ada",
  "languages": ["JavaScript", "TypeScript"],
  "active": true
}

Content and types do not change; only whitespace and line breaks outside text strings are normalised.

How it works

Paste a JSON document and choose the operation you need:

  • Format adds line breaks and two-space indentation.
  • Minify removes unnecessary whitespace outside strings.
  • Copy and Download use the generated result.

The tool checks syntax before converting anything. To locate and understand an error without transforming input, use the JSON validator. The guide how to validate JSON and find an error explains how to interpret the line, column, and context first.

Everything runs in this tab. Input is not stored, added to the URL, or sent to Tools in a Tab.

Common errors and edge cases

JSON requires double quotes for properties and strings; single quotes, trailing commas, and comments cause an error. Empty input is not JSON. Nested objects and arrays retain their structure, Unicode strings remain intact, and large integers are kept exactly as written rather than being converted through Number. Performance with very large documents depends on the device.

Frequently asked questions

Does it automatically repair invalid JSON?

No. It reports the error but never silently changes quotes, commas, or values, because an automatic repair could change what the data means.

Can I format an array or a primitive value?

Yes. A JSON document may have an object, array, string, number, boolean, or null as its root value.

Is my data retained?

No. The tool does not use local storage for input; closing or reloading the page clears it.

Reviewed on by Tools in a Tab.