JSON Converters Code Gen Formatters All tools Browse all tools built byAbhay Darji

JSON Formatter & Validator

Format, validate and inspect JSON in your browser. Precise error positions, one-click repair and a collapsible tree view. Your data never leaves the tab.

100% client side No upload No size limit Works offline
Input
Output
Ready
Drop a file to load it

About this tool

Paste JSON and get it formatted, validated and explorable straight away. When something is wrong, you get the exact line and column, a caret under the offending character and an explanation in plain English — not just "unexpected token". Most common breakages can be fixed with a single click.

When you would use it

  • Making a minified API response readable while debugging
  • Finding the one missing comma in a 3,000-line configuration file
  • Checking a payload is valid before pasting it into a request

Worked example

Minified
{"id":4815,"name":"Ada","roles":["admin","editor"],"active":true}
Formatted
{
  "id": 4815,
  "name": "Ada",
  "roles": [
    "admin",
    "editor"
  ],
  "active": true
}

Things worth knowing

  • Formatting preserves key order by default; sorting is a separate, explicit action.
  • Duplicate keys are reported rather than silently collapsed — the later value wins in every JSON parser, which is rarely what you intended.
  • Numbers are re-emitted from their parsed value, so 1.0 becomes 1. Use a string if you need to preserve exact formatting.
Questions

Frequently asked

Why does my JSON say "unexpected token" somewhere that looks fine?
The reported position is where the parser gave up, which is usually just after the real mistake. A missing comma on line 40 surfaces as an error on line 41. JSONWorks points at the token that broke the parse and explains what it expected instead, which usually makes the real cause obvious.
What does the Repair button fix?
Trailing commas, single-quoted strings, unquoted keys, comments, NaN, undefined, unclosed brackets, JSONP callback wrappers and double-encoded JSON. It works on the token stream rather than with regular expressions, so string contents are never corrupted.
Can it handle JSON with comments?
Strict JSON forbids comments, so they are reported as an error. Repair strips them, and the JSON5 tools accept them natively along with trailing commas and unquoted keys.
Is my data uploaded anywhere?
No. Every tool on JSONWorks runs entirely in your browser using JavaScript. Your input is never sent to a server, never logged and never stored. The simplest proof is to disconnect from the internet — the tools keep working. The site does load Google Fonts and a Google Analytics page-view tag, so you will see those two requests in your network tab, but neither receives anything you type or paste.
Is there a size limit on the JSON I can format?
There is no server-side limit because nothing is uploaded. The practical ceiling is your device’s memory. Documents over about 100 KB are processed in a background worker so the interface stays responsive, and files in the tens of megabytes are usually fine on a desktop.
Does it work offline?
Yes. JSONWorks is installable as a progressive web app and caches itself on first visit, so every tool keeps working without a connection.
Everything else

183 tools, grouped by what they do

Formatters, validators, converters and code generators for the formats developers actually wrangle. Every one of them runs in your browser.

JS

JSON tools

Everything for reading and fixing JSON — formatting, validating with precise error positions, exploring large payloads as a tree, and repairing the malformed documents that APIs actually return.

18 tools
CO

Converters

Move data between the formats that configuration files, APIs and spreadsheets speak. Each converter states plainly what survives the trip and what cannot.

14 tools
CO

Code generators

Paste a representative response and get types you can compile. The inference merges every object in an array, so a field missing from one item becomes optional rather than silently required.

57 tools
FO

Formatters

Make unreadable code readable. Every formatter is token-aware, so strings, comments, regular expressions and template literals survive untouched.

23 tools
XM

XML tools

A full XML workbench: pretty-printing with namespace-safe output, well-formedness validation that names the mismatched tag, and conversion into every other format here.

7 tools
YA

YAML tools

YAML fails in quiet ways: a stray tab, a Norway-problem boolean, an over-indented block. These tools surface those before your pipeline does.

4 tools
CS

CSV tools

Proper RFC 4180 handling — quoted fields, embedded commas and newlines, doubled quotes — plus delimiter sniffing so pasted data usually just works.

2 tools
CS

CSS tools

Format, compress, and move between preprocessor dialects. Conversions translate syntax — variables, nesting and structure — rather than compiling your stylesheet.

25 tools
EN

Encoders

Unicode-safe by construction: everything routes through UTF-8 bytes rather than the browser primitives that mangle anything outside Latin-1.

14 tools
ES

Escapers

Every escaper here round-trips exactly — including backslashes, newlines and emoji, which is where most escaping tools quietly corrupt your data.

16 tools
UT

Utilities

The small things: diffing two documents, transforming strings, inspecting data URIs.

3 tools

Your data stays yours

Every tool runs as JavaScript in your tab. Nothing is uploaded, logged or stored. Open the network tab and watch — or pull the plug and keep working.

Built for real payloads

Large documents are parsed in a background worker, so the interface never freezes. There is no upload limit because there is no upload.

Errors that tell you something

Line, column, a caret under the offending character and an explanation of the rule that broke — plus one-click repair for the fixable cases.