Categories

Digital Tools Hub

JSON Formatter

Format, validate, minify and explore JSON. Errors are pinpointed to the exact line and column. Nothing leaves your browser.

Input

Waiting for input

Output


                
                
—
Ctrl/⌘ + Enter to format

How it works

Paste JSON or open a .json file. The formatter parses it with your browser’s built-in JSON.parse, so validation is exact. If something is wrong you’ll see the line and column of the first error, with that line highlighted.

  • Format re-indents with 2 spaces, 4 spaces or tabs.
  • Minify removes all whitespace for the smallest payload.
  • Sort keys orders object keys alphabetically (recursively), which makes diffs easier to read.
  • Tree view lets you expand and collapse nested objects and arrays.

Your input is kept as a draft in this browser so you don’t lose work on refresh. Nothing is uploaded.

FAQ

Is my JSON sent to a server?

No. Parsing, formatting and validation all happen locally in your browser, so it’s safe for API keys, tokens and private data.

Why does it say “Unexpected token”?

Common causes are trailing commas, single quotes instead of double quotes, unquoted keys, or comments. Strict JSON allows none of these.

How large a file can it handle?

Several megabytes comfortably. Very large files may be slower to highlight; minify or the tree view stay fast.

Related tools

All developer tools
New

Base64 & URL Encoder

Encode and decode Base64, URL, HTML entities and inspect JWT tokens. Unicode-safe and private.

Developer
New

Hash Generator

MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text or files, plus HMAC signing.

Developer
New

UUID Generator

Generate UUID v4 and time-ordered v7 identifiers in bulk, validate UUIDs and copy in one click.

Developer

Mock Data Generator

Generate realistic test data from a custom schema and export it as JSON or CSV.

Developer