All free tools Runs in your browser

JSON Formatter and Validator

Paste JSON to pretty-print it, minify it or sort its keys, and see exactly where it breaks when it is not valid.

Format or validate JSON

.json
Paste an API response, a package.json, a composer.json or any config file. Press Ctrl + Enter to run again.
Read locally with FileReader and never uploaded. Maximum 15 MB.
Output options

Your JSON never leaves this device. Parsing, formatting and validation happen in your browser. Nothing is uploaded to VPSLake or stored anywhere, so tokens and customer data in an API response stay with you.

Clean up JSON in four steps

Works for anything from a one-line API reply to a large exported config.

  1. 1

    Paste or open your JSON

    Drop text into the box, or open a .json file from your computer. Nothing is uploaded.

  2. 2

    Pick the layout

    Choose 2 spaces, 4 spaces or tabs, and tick Sort keys if you want keys in alphabetical order at every level.

  3. 3

    Format or minify

    Press Format JSON for readable output or Minify for the smallest single line. If the JSON is broken you get the line, column and reason instead.

  4. 4

    Copy or download

    Copy the result back into your editor, or download it as a file ready to upload to your server.

Errors you can actually fix

A browser's own message, such as Unexpected token, rarely says what is wrong. This validator re-reads broken input with a strict scanner and names the problem in plain words, with a pointer under the exact character.

  • Trailing commas before } or ]
  • Single quotes and unquoted keys
  • Missing commas, brackets and closing quotes
  • Comments, NaN, undefined and bad escapes

Where server admins use it

JSON shows up all over a VPS: Docker's daemon.json, Node and PHP package files, cloud provider API replies, monitoring webhooks and log lines from services that write structured logs.

One stray comma in /etc/docker/daemon.json is enough to stop Docker from starting. Paste the file here before you restart the service, then confirm on the server with python3 -m json.tool daemon.json or jq . daemon.json.

Keep a copy before you replace a live config

Formatting does not change values, but sorting keys changes their order, and a few programs care about order. Back up the original file (cp daemon.json daemon.json.bak), upload the new one, and test the service before you close your SSH session.

JSON Formatter FAQ

No. The page loads once and then everything runs in JavaScript inside your browser. The text you paste and any file you open are never uploaded or stored.
It gives the line and column where parsing stopped, a short reason such as "Trailing comma before } is not allowed" and a copy of that line with a ^ under the problem character. Often the real mistake is just before that point, for example a missing comma at the end of the previous line.
Standard JSON (RFC 8259) does not allow them. Some tools accept "JSONC" or JSON5, but most servers, APIs and programs such as Docker and jq do not, so the validator follows the strict standard.
Format adds line breaks and indentation so people can read it. Minify removes all optional whitespace to make the smallest possible text, which is what you want for API payloads and files served over the network.
The values stay the same; only the order of keys inside each object changes. Array order is never touched. Sorted output is useful for comparing two versions, but keep the original order if a program depends on it.
Yes. Text is kept exactly as written, including Hindi, accented letters and emoji. The size shown is the real UTF-8 byte count, which is what a server or API limit measures.
Files up to 15 MB can be opened, and larger pasted text usually works too. The limit is your browser's memory; a few megabytes formats almost instantly on a normal laptop.