DevToolPal
EN

JSON Formatter & Validator

Beautify, validate and minify JSON with exact error positions. Runs entirely in your browser.

Runs locally, never uploaded

Options

Mode

Input

0 chars · 0 B

Output

0 chars · 0 B

What it does

The JSON formatter turns compact or messy JSON into readable, indented text, and checks that it is valid at the same time. If the JSON is broken, it tells you exactly which line and column is wrong and why, for example a missing comma, single quotes, or a trailing comma.

How to use

  1. Paste JSON into the Input box, drop a .json file on it, or click Sample.
  2. Pick Format to beautify or Minify to strip all whitespace.
  3. Choose 2 spaces, 4 spaces or tabs, and turn on Sort keys to order object keys alphabetically.
  4. Copy or download the result. Shortcuts: Ctrl/Cmd+Enter runs, Ctrl/Cmd+Shift+C copies.

Example

{"name":"devtools","tags":["json","formatter"]}

becomes

{
  "name": "devtools",
  "tags": [
    "json",
    "formatter"
  ]
}

FAQ

› Is my JSON uploaded anywhere?

No. Formatting and validation run entirely in your browser. Nothing you paste is sent to a server.

› Why does it say "Trailing comma is not allowed"?

Standard JSON forbids a comma after the last item of an object or array. Remove the comma that the error points to.

› Can it handle large files?

Yes. Inputs up to 1 MB format as you type; larger files switch to manual mode, so press Run (Ctrl/Cmd+Enter).