JSON Minify / Formatter / Validator

About this tool

Use the tree view to browse JSON and copy a node’s JSON Pointer. Remove unnecessary whitespace and line breaks from JSON (minify), add readable indentation (pretty print), and detect syntax errors. It is useful when inspecting logs or API responses and when trimming pasted JSON before sharing. All processing happens entirely in your browser (no data is sent).

JSON Minify / Formatter / Validator

—

How to use

  1. Paste JSON into the input area and press Pretty or Minify.
  2. Press Validate to check for syntax errors. When the browser reports a position, validation highlights the error and shows its line and column.
  3. Open the tree, expand its nodes and select one to see or copy its JSON Pointer. Up to 100 entries are shown at a time per level.

A JSON Pointer identifies a value. The root is an empty string, and ~ and / in keys are written as ~0 and ~1. Editing the input hides the tree.

Example

Before:

{"a":1,"b":[2,3]}

After (Pretty):

{
  "a": 1,
  "b": [
    2,
    3
  ]
}

Use cases

  • Make API responses easier to read or analyze logs.
  • Check configuration files (JSON) for mistakes.
  • Minify JSON before pasting or sending it.