data_object

JSON Formatter

Paste raw JSON, get back a readable tree or a minified blob. Validates as you go, copy or download the result.

FreeClient-sidePretty + MinifyValidator

Pretty-printing is parsing in disguise

Every JSON formatter on the web does the same two-step: it runs JSON.parse on your input, then JSON.stringify with a chosen indentation. The interesting work is in the error message you get when parsing fails. Browsers ship excellent JSON parsers — the V8 engine in Chrome will point you at the exact character where the parse broke.

Minification is the reverse: parse, then stringify with no indentation. The result is the smallest JSON that re-parses to the same value. For wire payloads (REST responses, config blobs, log lines) this typically saves 30-60% of bytes versus pretty-printed JSON.

Keep in mind that JSON is a strict subset of JavaScript. Trailing commas, single quotes, and JavaScript-style comments are all invalid JSON and will fail to parse. If you have one of those, fix it first or use JSON5 (a separate tool).

How to use

  1. 1

    Paste your JSON in the left pane.

    Or type by hand — the editor is dark-themed and fixed-width.

  2. 2

    Click Pretty.

    Indent with 2 or 4 spaces (we default to 2, the React/Prettier convention).

  3. 3

    Or click Minify.

    Strips every byte that isn't needed for round-trip — perfect for embedding in URLs or log lines.

  4. 4

    Read the error if any.

    We bubble up the browser's parser error verbatim — usually accurate to the character.

  5. 5

    Copy or sign in to download.

    Copy works without sign-in; saving a .json file requires an account.

Read next

Related tools

code
Open source credit. Built on top of Native JSON API with UX inspired by IT-Tools.