JSON formatter

Format, validate, or minify JSON without changing its numbers.

FreeNo pass requiredNo ads

Your text and files stay in your browser.

Drop a file here, or use Open file. Ctrl+Enter / Command+Enter runs the tool.

Ready for your input
Processed on your device

Paste text or try an example to begin.

No uploads. No ads. No Data Pass required. Buy me a coffee

Make JSON readable without changing its values

Paste a compact API response, configuration file, or exported JSON document to check its syntax and make its structure easier to read. The formatter adds indentation around objects and arrays while preserving number tokens and quoted strings exactly as written. This matters for long identifiers, precise decimals, and escaped characters that ordinary parse-and-save workflows can accidentally change. Switch to minify when you need the same valid document without extra formatting whitespace.

JSON formatting examples

Format an API response

Input

{"name":"Avery","active":true}

Result

{
  "name": "Avery",
  "active": true
}

Two-space indentation makes the object easier to scan. The property order remains unchanged unless you explicitly enable key sorting. Formatting does not check whether these fields match an API schema.

Keep a long identifier exact

Input

{ "id": 9007199254740993, "value": 1.2300 }

Result

{"id":9007199254740993,"value":1.2300}

Choose Minify & validate. The large integer is not rounded, and the decimal keeps its written precision. Minifying removes only formatting whitespace outside strings.

How to format or validate JSON

  1. Paste JSON into Input, open a UTF-8 file, or choose Try example. The original input remains available beside the result.
  2. Choose Format & validate or Minify & validate. For readable output, select two spaces, four spaces, or a tab.
  3. Enable Sort object keys only when you want alphabetical key order. Arrays always retain their original order because changing that order can change meaning.
  4. Review any error location, correct the input, and run again. Copy or download valid output, or send it directly to JSON to CSV when it contains flat records.

JSON formatter questions

Does formatting upload my JSON?

No. Parsing and formatting run in a local browser worker. Neither the input nor the result is sent to MySafeInfo. Moving a result to another compatible tool also happens in the same tab without browser storage or a content-bearing URL.

What happens to repeated property names?

The formatter flags repeated keys in the same object instead of silently choosing one value. Escaped and literal spellings of the same property name are treated as duplicates. Rename or remove the repeated property deliberately before continuing.

Can I use comments or trailing commas?

This tool validates standard JSON. Comments, unquoted property names, trailing commas, undefined, and non-finite number literals are not accepted. An error includes a line and column without copying your data into diagnostic messages.

Can formatting verify my API response?

It verifies JSON syntax, not application rules or a JSON Schema. A syntactically valid document can still contain missing fields, incorrect units, or values that your application rejects. Check those requirements in your application or schema validator.

JSON formatting limits

Use inputs up to 10 MiB, at most 250,000 values, and no more than 100 nesting levels. Output size and processing time are bounded to keep the page responsive. Split large documents before formatting. A string remains a string: the tool does not automatically parse JSON embedded inside another JSON string.