JSON Formatter & Validator: Beautify, Minify and Fix JSON

Paste JSON to validate, beautify, minify, explore as a tree, query with JSONPath or convert it. Errors show the exact line and column.

Loading tool…

How to use the JSON Formatter & Validator

  1. Paste or type your JSON, drop a .json file, or use Load file.
  2. Pick a mode: Format, Tree, JSONPath, Convert or Escape.
  3. If the JSON is invalid, read the line and column in the error, or click Try to repair.
  4. Copy the result or download it.

About this tool

JSON (JavaScript Object Notation) is the standard format for APIs, config files and data exchange. It is strict: a trailing comma, single quotes around a string, comments or an unquoted key make a parser reject the whole document. This tool uses its own strict parser, so the line and column in an error are exact and the same in every browser.

Format mode re-prints JSON with 2 spaces, 4 spaces or tabs, or minifies it, and can sort keys. Tree mode shows collapsible nodes. JSONPath mode filters data with expressions such as $.items[?(@.price < 10)].name. Convert mode turns an array of objects into YAML, XML or CSV, and Escape mode escapes or unescapes text for use inside a JSON string. The Try to repair button fixes comments, single quotes, unquoted keys, trailing commas and Python-style True, False and None, and tells you what it changed.

Whole numbers larger than 9,007,199,254,740,991 (2 to the power 53, minus 1) cannot be held exactly by JavaScript, so ordinary tools silently round them. This tool keeps the original digits in Format, Tree and JSONPath modes and warns you when such numbers exist. Your JSON is processed in your own browser and never uploaded. To compare two JSON files, use the Diff Checker.

Frequently asked questions

How do I find the error in my JSON?

Paste it in and the validator shows the message with the exact line and column. Common causes are trailing commas, single quotes, comments and unquoted keys. Click Try to repair to fix the common ones automatically.

What is the difference between format and minify?

Format adds indentation and line breaks for reading. Minify removes all optional whitespace to make the smallest possible text.

Is my JSON sent to your server?

No. Parsing and formatting happen in your browser.

Can it sort keys?

Yes. Turn on Sort keys to order object keys alphabetically at every level.

Why does it warn about big numbers?

JavaScript stores numbers as 64-bit floats, so integers above 9,007,199,254,740,991 lose digits when parsed normally. This tool keeps them exact for display, but code that reads them with JSON.parse will round them, so send large IDs as strings.

What JSONPath features are supported?

Child and recursive names, indexes, negative indexes, slices, wildcards and filters with comparison, && and || operators. It is a practical subset, not every JSONPath dialect.

Need a custom tool or website?

IDM Valley builds web apps, calculators, AI chatbots and automation for businesses. Fixed prices, code in your name.

Get a free quote

Have a project in mind?

Tell us what you need: a website, landing page, AI chatbot or automation. You get a clear scope and a fixed price within one working day. Free, no obligation.


  • avshack
  • DivineBamboo
  • goldleaf
  • janapril
  • kaizen
  • kwc
  • modv
  • pixelrush
  • revital
  • riderzplanet
  • sandsfashions
  • avshack
  • DivineBamboo
  • goldleaf
  • janapril
  • kaizen
  • kwc
  • modv
  • pixelrush
  • revital
  • riderzplanet
  • sandsfashions