JSON Formatter - Format, validate and compare JSON locally | POLPROG Skip to content

JSON Formatter

Format, validate and compare JSON locally

Format, validate and compare JSON in the browser, with nothing sent anywhere.

Web tool Web
Official product page Publisher: POLPROG
Official product page
3
Modes in one workspace
19
Named syntax errors
5 MiB
Maximum document size
0
Data sent to a server
01JSON Formatter

About

Three modes, one workspace. Format, Validate and Diff share the same parser and the same editor, so a document behaves identically whichever mode reads it, and switching between them never reformats what you pasted.

What each mode does

ModeWhat it does
FormatRewritesRe-indent with two spaces, four spaces or tabs, strip the whitespace back out, or sort keys recursively in either direction. Values, escapes and Unicode come back exactly as they went in, and arrays keep their order.
ValidateLocatesNames the fault and points at it, rather than reporting that the document is invalid and leaving you to find out where.
DiffCompares dataTwo documents compared by what they mean, with every change labelled added, removed, changed or type changed.

Faults are located, not just reported

Nineteen distinct causes are named, each with its line, its column and its byte offset, and the surrounding lines are printed with a caret under the character. A trailing comma, a single-quoted key, a bare word, a comment, an invalid escape and a raw control character inside a string all read as themselves instead of as one generic parse error.

Two faults a valid document can still carry

Both are reported on documents that parse cleanly, because both change your data silently. A duplicate key cannot be recovered by anything: JSON.parse keeps only the last value, and so does every other parser you are likely to use, so the warning names the key and its line in order to fix the producer. An integer beyond 2^53 changes value the moment JavaScript reads it, which is how a 64-bit identifier quietly becomes a different identifier.

What the diff refuses to call a difference

Indentation, line endings and the order object keys were written in carry no meaning in JSON, so they are not differences. Array order does carry meaning and is compared as a sequence, which is why one inserted element reads as one insertion rather than as every element after it having changed.

Reading a document too large to scroll

  • The tree opens one level at a time, so a large file does not become a large page. Every row carries the path that reaches it, users[4].email, with a button to copy the path or the value.
  • Search by key, by value or both, with a match count and a step through the hits.
  • Statistics appear once the document parses: keys, objects, arrays, strings, numbers, booleans, nulls, maximum depth, size and lines.
  • Conversions to YAML, to a TypeScript interface or to CSV. When a document cannot be a table, the CSV path says which shape it needed rather than emitting something misleading.

The ceiling is 5 MiB. Above roughly 300 KiB the syntax colours switch off so typing stays smooth, and on very large documents the detailed diff stops early and says so; validation and statistics keep working across the whole range.

There is no API endpoint behind this page. The document is parsed in browser memory and never reaches a server, nothing is written to storage or to the address bar, and the only thing kept between visits is which indentation you picked.

02Use case

What it solves

The problem
  • "Invalid JSON" with no line, no column and no reason
  • Duplicate keys and 64-bit identifiers disappear without a word
  • Production payloads get pasted into a stranger’s website
The outcome
  • The fault is named, with its line, column and context
  • Two documents compared by their data, not their whitespace
  • The document never leaves your own machine
Who it is for
  • Developers working with APIs, fixtures and config files
  • Engineers comparing payloads between two environments
  • Anyone who has to read a large JSON file quickly
03Key Features

Key Features

The most important capabilities, explained in practical terms.

Format, minify and sort

Re-indent with two spaces, four spaces or tabs, strip the whitespace back out, or sort keys recursively in either direction. Values, escapes and Unicode come back exactly as they went in, and arrays keep their order.

Errors with a line, a column and context

Nineteen distinct causes are named, from a trailing comma to a single-quoted key, each with its line, column and byte offset and the surrounding lines printed with a caret under the character.

Duplicate keys and lost precision

Both are reported on documents that are otherwise valid: JSON.parse keeps only the last of a repeated key, and integers beyond 2^53 change value the moment JavaScript reads them.

A diff that compares data

Indentation, line endings and key order are not differences. Arrays are compared as sequences, so one inserted element is one insertion, and every change is labelled added, removed, changed or type changed.

Tree view with copyable paths

The tree opens one level at a time, so a large file does not become a large page. Every row carries the path that reaches it, users[4].email, with a button to copy the path or the value.

Search and conversions

Search by key, by value or both, with a match count and a step through the hits. A document converts to YAML, to a TypeScript interface or to CSV, which says which shape it needed when a document cannot be expressed as a table.

Nothing leaves the browser

The tool has no API endpoint. The document is parsed in browser memory and is never uploaded, logged or stored.

04Download

Product access

A clear path from the official source to your first successful workflow.

Choose the right platform

Use one of the official links available for your device or browser.

Install or open

Follow the store instructions or open the web application. No third-party installers.

Configure and begin

Review the options, choose your preferences and start with the core workflow.

Official access options
05Technology

Technology behind the product

A transparent look at the core technologies used to build and maintain this product.

JavaScript
06Security

Privacy & Security

Your data stays on your device. Always.

No account, no sign-up
No API endpoint and no network traffic
Documents never leave the browser
Nothing is logged, stored or tracked