DEV · JSON

JSON Formatter

Paste JSON to validate, then format or minify it.

  1. 1.Type or paste your text
  2. 2.The result updates automatically
  3. 3.Copy the result

→ Output: Formatted or minified JSON text

Enter JSON and format/minify.

About this tool

Checks whether pasted JSON is valid, then either indents it for reading or strips whitespace into a single compact line. It points to where the syntax breaks, which helps when hunting an error inside a long response. Everything runs inside your browser and nothing is sent to a server.

When to use it

  • —An API response arrives as one long line and you want to see its structure
  • —A config file fails to parse and you need the exact bracket or comma at fault
  • —You want to shrink a JSON file for deployment by removing whitespace

Good to know

  • —JSON5 and JSONC with comments are not standard JSON and will be reported as errors.
  • —Minifying removes line breaks, so keep the original copy somewhere safe.
  • —Key order is preserved exactly as entered; nothing is sorted.

Share your feedback on this tool

Used 0 times so far
Sign in to leave feedback