Developer Tools

JSON Formatter / Validator

Format, minify or validate JSON in your browser. Preserve number spellings, string escapes and key order, with syntax error locations and a notice for repeated object keys.

Your content stays on your device Free, with no account
Readable JSON, with values kept intact Local processing

Need several developer steps together? Open Developer Studio →

Up to 200,000 UTF-16 text units, 50,000 tokens and 100 nested containers. JSON syntax only; no comments or trailing commas.

Syntax errors include a line and column. Strings and number spellings are preserved, including large integers. This is not JSON Schema validation.

YOUR RESULT

Ready. Paste JSON and choose an action.

Validate only checks syntax and shows no output. No values are evaluated, fetched or stored. Editing any input clears old results.

A FEW SIMPLE STEPS

How to use JSON Formatter / Validator

  1. Paste JSON or load the example with a large integer and nested values.
  2. Choose Format, Minify or Validate only. Formatting supports two spaces, four spaces or tabs.
  3. Select Process JSON. Review the syntax result, root type, token count and any repeated-key notice.
  4. Copy or download formatted or minified JSON. Validation-only mode creates no output; input edits clear previous results.
PRIVATE BY DESIGN

Why use this tool?

Your JSON is processed entirely in your browser without uploads, accounts, dependencies or saved input history. Formatting changes only whitespace outside string tokens, so numbers and escaped strings stay as written. The original remains available for review and no JSON content is executed.

Tool inputs stay in your browser. Only your theme preference is saved on this device.

A few things worth knowing

Can it format large integers without rounding them?

Yes. Numbers are treated as source tokens, not converted into JavaScript Number values. Large integers, negative zero, decimal trailing zeros and exponent spellings are kept exactly as written. String escape spellings and object member order are also retained. This is a whitespace formatter rather than a JSON.parse/JSON.stringify round trip or canonical JSON generator.

What happens with duplicate keys?

Repeated member names are accepted by the syntax checker, preserved in output and counted in a notice. Keys are compared after JSON escape decoding, within each individual object. Other programs may reject duplicates or keep only one value; resolve repeated keys deliberately before sharing JSON. No keys are sorted or merged.

What syntax can I validate?

Strict JSON values: objects, arrays, strings, numbers, booleans and null, including top-level primitives. Comments, trailing commas, single-quoted strings, unquoted keys, undefined, NaN and Infinity are rejected. This tool does not validate JSON Schema, application rules, security, numeric interoperability or the content of strings.

How do validation mode and error locations work?

Validate only checks syntax and shows statistics, with no output or export. Format and Minify perform the same syntax check before generating output. Errors show a one-based line and UTF-16 column, plus a zero-based UTF-16 position. An error location indicates where parsing failed; the cause may be earlier. Browser textareas normalize pasted line endings to LF.

What are the limits?

Input is limited to 200,000 UTF-16 units, 50,000 tokens and 100 nested containers. Formatted output is limited to 1,000,000 units; deeply indented input may require Minify instead. Over-limit runs return no partial output. A leading BOM is rejected rather than silently removed. Raw unpaired UTF-16 surrogates are rejected to avoid replacement on UTF-8 download; JSON backslash-u escapes remain preserved, including escaped surrogate units.

Does it save or upload JSON?

No. Processing stays on your device, with no network requests or saved input history. Copy and JSON download include only the output. Clear keeps your current action and indentation; Try an example restores Format with two spaces. Editing input or controls invalidates previous results. Third-party consumers may still interpret accepted number ranges and duplicate members differently.