+Moyoutil
English

JSON Formatter and Validator: Check Errors and Numbers

Format or minify JSON, locate syntax errors and check number precision issues. Compare the processed result with the original before copying or downloading.

How to use the JSON Formatter and Validator

Paste your JSON and choose Format and validate. Syntax errors include a line, column, and explanation; Go to error selects the indicated position. Minify JSON removes unnecessary whitespace outside strings.

Example usage

Property names must be enclosed in double quotes, such as {"name":"Moyoutil","free":true}. A comma after the last item is not allowed.

Please note

Maintain original numeric notation and key order. Please check the numeric precision of the receiving program separately. Input supports UTF-8 2MiB, 128 levels of nesting, and output supports up to 8MiB.

Step-by-step instructions

  1. Enter JSON data.
  2. Choose Format and validate to add indentation, or Minify JSON to remove unnecessary whitespace.
  3. Read the error message and its line and column. Go to error selects the indicated character, or moves to the end if the input is incomplete. Check that position and the preceding characters, make your correction, and validate again.

Differences between JSON and JavaScript objects

JSON property names and strings must use double quotes. Single quotes, comments, undefined, and a comma after the last item do not conform to JSON grammar. After checking the grammar, it is output as an original text token, so the notation of numbers, duplicate keys, and key order are maintained. Data with duplicate keys may be interpreted differently depending on the receiving system. Input supports UTF-8 2MiB and up to 128 levels of nesting.

JSON cleanup input and result example
InputJudgment
{"ok":true,"count":3}Valid JSON
{'ok':true}Error due to single quote
{"count":3,}Error due to final comma

Frequently Asked Questions

If it passes the grammar check, does it also meet the API specifications?

No. Only JSON grammar is checked. It does not include schema validation such as required fields, data types, or business rules.

Is the notation of the original numbers maintained?

Yes. Keep the 1.0, large integer, and exponent notations, but change only the spaces and indentation outside the string.

If I paste a sensitive token, will it go to the server?

Tool input is not sent to the server. Still, it's a good idea to make sure you trust shared devices and browser extensions, and avoid using confidential data.

Created and operated by: Moyoutil · Content review: 2026-10-01 · Error report

Tool Utilization Blog

See all blogs

JSON Whitespace Errors: NBSP Is Not an Ordinary Space

Reproduce JSON validation with U+0020 and U+00A0 in the same position. Separate syntax whitespace from string data before replacing characters.

Read the article

JSON Newline Errors: \n, \\n and Real Line Breaks

Troubleshoot JSON newline errors with tested examples. Compare escaped newlines, double backslashes, line breaks between tokens and Moyoutil formatting.

Read the article

JSON Number Precision: Format Large Integers Without Changing IDs

See why JSON formatting can change an ID. Compare large integers, 1.00, 1e3 and duplicate keys using actual code, and check what Moyoutil preserves and validates.

Read the article

JSON Formatting, Base64 and URL Encoding: A Practical Guide

Distinguishes the purposes of JSON grammar checking and cleaning, UTF-8 Base64 encoding/decoding, and URL parameter encoding. We've compiled examples you can run yourself, as well as big integers, double encoding, and security precautions.

Read the article

CSV and JSON Conversion: Quotes, Line Breaks, and UTF-8 Files for Excel

Explains how to convert CSV·TSV into a JSON object array or save JSON as CSV. Check column names, string preservation, UTF-8 BOM, formula interpretation and nested data limits.

Read the article

Generate UUID v4: Lists, JSON Export, and Duplicate Checks

Describes how to create v4 identifiers with the UUID generator, using 36-character format, case, and bulk generation/JSON storage. Also check the differences in duplicate inspection scope and authentication/authority management.

Read the article