Tool workspace

JSON formatter, JSON validator and JSON decoder online

Format, minify, validate, sort keys, copy and download JSON payloads.

JSON formatter and validator

Size: bytes Keys: Depth:

        

JSON formatter and validator

bytes →


        
    

JSON formatter and validator

Query parameters

IDN / Punycode


    

JSON formatter and validator

..

Header


    

Payload


    

Metadata


        
    

Verify signature

Sign (HS)


            

JSON formatter and validator

Pattern library

Highlighted matches

Matches ()

Replacement result


    

JSON formatter and validator

Relative:

Timezone

Build from parts


        
Day of year: Week: Weekday:

Difference


        

JSON formatter and validator


    

JSON formatter and validator

JSON formatter and validator


        
    

Examples

Input

{"name":"Ann","roles":["admin","editor"],"active":true}

Formatted

{
  "name": "Ann",
  "roles": [
    "admin",
    "editor"
  ],
  "active": true
}

JSON Guides & articles

JSON formatter and validator

Format, minify, validate, sort keys, copy and download JSON payloads. DevToolGrid Online offers a free JSON formatter, JSON validator and JSON decoder online.

What is JSON?

JSON (JavaScript Object Notation) is a lightweight, text-based format for exchanging data between servers and applications. It stores information as key–value pairs and ordered lists, is language-independent and is easy for both people and machines to read. A JSON formatter re-indents minified or messy JSON so its structure becomes clear.

How to format JSON

  1. 1 Paste or type your JSON into the input panel on the left.
  2. 2 Choose an indentation size — 2 spaces, 4 spaces or tabs.
  3. 3 Click Format to pretty-print it, or Minify to compress it to a single line.
  4. 4 Copy the result or download it as a .json file. Everything runs in your browser.

Common JSON errors

  • Missing commaEvery key–value pair except the last must be separated by a comma. A missing comma between properties is the most common syntax error.
  • Missing or extra bracketEach { or [ needs a matching } or ]. An unbalanced bracket makes the whole document invalid.
  • Invalid quotesJSON keys and string values must use double quotes. Single quotes or unquoted keys are not valid JSON.

JSON Formatter vs JSON Validator

A JSON formatter focuses on readability: it indents and aligns valid JSON so you can scan it quickly. A JSON validator focuses on correctness: it checks the syntax and reports the exact line and column of any error. This tool does both — it formats valid JSON and points to the first error when the input is invalid.

FAQ

Is this tool free?

Yes. The JSON formatter is completely free, with no sign-up and no usage limits.

Is my JSON sent to a server?

No. All formatting, validation and conversion happen locally in your browser, so your data never leaves your device.

What is the maximum file size?

There is no hard limit; it depends on your device memory. Documents up to a few megabytes format instantly on a typical computer.

Can it convert JSON to other formats?

Yes. It converts JSON to and from YAML and CSV, exports XML and TypeScript types, and runs JSONPath queries.