Preserves token text · Runs in your browser

JSON Formatter & Validator

Format or minify JSON without rounding large numbers or dropping duplicate keys. Find syntax errors by line and column, then copy or download the result locally.

JSON input and formatting

Your JSON is not uploaded or automatically saved in browser storage. Do not paste passwords, API keys or other secrets.

Up to 2 MB input (2,000,000 UTF-8 bytes), 8 MB output, 128 nesting levels and 100,000 tokens. No silent truncation or automatic repairs.

Leave blank for the whole document. /items/0 selects the first array value; / selects an empty key. Escape / as ~1 and ~ as ~0 in keys. Maximum 4,096 characters. Documents with duplicate keys support whole-document formatting only. JSONPath and URI fragments are not supported.

Format data without changing its tokens

A long tracking ID can lose digits when a formatter converts it to a JavaScript number. This tool reads JSON syntax without converting numeric values. It also leaves key order and duplicate entries intact, so formatting does not silently decide which value should win.

How to use it

  1. Paste your JSON and choose Pretty print or Minify.
  2. Select Validate and format. If an error appears, use its line and column or Go to error to select the source character.
  3. Review the output, then copy it or download a JSON file. Editing the input clears the old result; run the tool again.

What changes

The formatter validates JSON grammar and keeps every number, string, literal and structural token as written. Pretty print adds two-space indentation; Minify removes whitespace outside strings. A top-level object, array, string, number, boolean or null is accepted.

A large-ID example

For {"id":9007199254740993,"ratio":1.2300e+02}, both number spellings stay unchanged. For {"a":1,"a":2}, both entries remain and a duplicate-key warning appears. Before importing the file, check how the receiving application handles these values.

Error positions and downloads

Lines and columns start at 1. Columns count UTF-16 code units, so an emoji can occupy two positions. Go to error selects the relevant character, or the end of input for an end-of-document error. Downloads contain UTF-8 JSON with no added BOM.

Questions and limits

Does valid JSON mean my API will accept it?

No. Required fields, schema types, business rules and authentication are not checked. JSONPath browsing, key sorting and automatic repairs are not currently provided.

Are comments or trailing commas accepted?

No. This strict JSON workflow rejects comments, trailing commas, single-quoted keys and a leading BOM. Process JSONL documents one at a time.

Will every program interpret the output identically?

No. Number limits and duplicate-key handling vary. Escaped unpaired surrogates remain as written and may cause interoperability problems. Passing this syntax check is not a compatibility guarantee.

Syntax reference: RFC 8259 · JSON Pointer · RFC 6901 · Feature and syntax reference checked:

한국어 JSON 도구

Content basis and verification

· Calculations run in your browser. Check the formula and assumptions on this page, and confirm important financial, tax, medical or legal decisions against current official guidance.
Maintained and reviewed by: Easynivo · Report a correction or source change