JSON Formatter & Validator
Validate JSON and see the exact line and column of any syntax error. Pretty-print with 2 or 4 spaces or tabs, minify, sort keys, then copy or download.
- Runs in your browser (no upload)
Up to 5 MB per file
Paste text or open a JSON file (up to 5 MB). Your data never leaves the browser.
Result
How to use
- Paste JSON or open a JSON file.
- Choose the output style (2 spaces, 4 spaces, tabs or minified) and turn on key sorting if you want.
- Valid JSON is formatted instantly — copy or download it. If there is an error, the line, column and the exact spot are shown.
FAQ
Can large numbers lose digits?
No. Numbers are kept exactly as written, so integers such as 12345678901234567890 are not rounded. You also get a warning when an integer cannot be represented exactly by JavaScript.
How are line and column counted?
Lines end at LF, CRLF or CR, and the column counts characters from the start of the line (an emoji counts as one). Positions come from our own validator rather than the browser-specific JSON.parse messages.
Are comments or trailing commas allowed?
No. Validation follows standard JSON (RFC 8259), so JSON5 or JSONC syntax is reported as an error with its position.
Notes & limitations
- What you enter is processed only on this page and is not sent to YUCTS servers.
- Input is limited to 5 MB.
- JSON5, JSONC (comments, trailing commas) and NDJSON (one JSON value per line) are not standard JSON and are reported as errors.
- Duplicate keys in one object are syntactically valid, so they are shown as a warning rather than an error and both entries are kept in the output.
Data sources
- RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format(opens in a new tab) — Checked on: 2026-10-31
Related tools
- CSV ⇄ JSON ConverterConvert CSV or TSV to JSON and JSON back to CSV or TSV. Handles quoted fields, line breaks in cells, UTF-8 BOM, delimiter detection and Shift_JIS, and lets you pick, reorder and rename columns.
- YAML ⇄ JSON ConverterConvert YAML to JSON and JSON to YAML safely: custom or executable tags are never loaded, alias expansion is limited, and errors show the line and column.
- Base64 Encoder & Decoder (Text and Files)Encode text (including emoji and any language) to Base64 as UTF-8 and decode it back. Supports URL-safe Base64, optional padding, files and data URLs.
- URL Encoder & Decoder (Percent-Encoding)Percent-encode or decode URLs and query strings in any language with encodeURIComponent, encodeURI or form encoding (+). Broken % sequences show the exact error position.
- Regex Tester (JavaScript)Test JavaScript regular expressions with highlighted matches, numbered and named groups and a replace preview. Patterns that run too long (ReDoS) are stopped automatically.
- Unix Timestamp ConverterConvert Unix timestamps to dates and dates to timestamps. Seconds, milliseconds, microseconds or nanoseconds, ISO 8601 with IANA time zones, values past 2038 and negative values before 1970.