{ } JSON Decoder

JSON Formatter & Validator

Format, validate, minify and pretty-print JSON — with precise error locations (line + character) and a collapsible tree view. Free, no ads, no sign-up. Everything runs in your browser: your data never leaves your device.

No. All parsing and formatting happen entirely in your browser. Your data never leaves your device.

Most modern browsers handle 1–10 MB smoothly. Very large files (>20 MB) may become slow or lag; consider a CLI tool for those.

Input JSON

Drag & drop supported

                    
                

Output

Waiting for input

                            

                        

Why JSON Decoder?

Fast, private, zero install — parse JSON right in your browser.

Instant formatting

One click expands compact JSON into readable output with indentation and automatic syntax highlighting.

Extreme minification

Strip every whitespace and newline to produce the most compact JSON for API transport.

Precise error location

When parsing fails, we show you the exact line and column along with surrounding context for fast debugging.

Collapsible tree

Expandable, structured view of nested data. Array length and key counts are shown inline.

Privacy first

Everything is computed in your browser. Your data is never uploaded to any server.

File import & export

Drop a.json file to load it, and export any result back to.json with a single click.

How JSON Decoder works

Pure browser-side JSON parsing — no upload, no log line, no third-party API call.

  1. 1

    Paste or drop your JSON

    Paste a JSON string into the editor or drop a .json file from disk. The browser reads it via FileReader directly into JavaScript memory — no XHR, no fetch, no upload. Even multi-megabyte payloads are fine; the parser streams them in chunks if needed.

  2. 2

    Native parser runs in the browser

    We hand the string to JSON.parse — the same V8 / SpiderMonkey / JavaScriptCore parser your browser uses for every fetch response. If parsing fails, the position of the bad character is reported with line and column so you can fix it instantly. No regex hacks, no ambiguous error messages.

  3. 3

    Tree view rendered locally

    Once parsed, the result is rendered as a collapsible tree using virtualised DOM nodes — so a 100,000-key object stays smooth at 60 fps. You can collapse arrays, copy paths, and navigate by keyboard.

  4. 4

    Format, minify, or download

    Pretty-print with 2 / 4 / tab indent, minify to a single line, copy to clipboard, or download the cleaned file. The transformation runs in your browser — the resulting bytes never leave the page.

Common use cases

Real situations where browser-only JSON parsing wins.

Debugging API responses

Copy a minified response body from your backend logs or DevTools, paste it here, and instantly see the structure. No need to install a CLI tool or set up jq aliases.

Inspecting JWT payloads

After Base64-decoding the middle segment of a JWT, paste the resulting JSON to see the claims, expiry, and any custom fields. The token never touches a server other than the one issued it.

Cleaning configuration files

Re-format a malformed .json config (Tailwind, ESLint, package.json, tsconfig) so it stops failing in CI. Catches trailing commas and duplicate keys that hand-written configs accumulate.

Comparing API contracts

Open two browser tabs side by side, paste the old and new schema. Use the tree view to spot added or removed fields without diffing escaped strings.

Why browser-only matters here

Your JSON often contains real customer records, API keys, JWT secrets, internal IDs, and PII. Most online JSON formatters POST your payload to their server — meaning a third party logs every field you paste. iKit's JSON Decoder runs as JavaScript in your browser tab, so the parser sees your data, but no server ever does.

  • Zero network requests during parsing — verifiable in DevTools → Network.
  • Works offline once the page is loaded — disconnect the network and parsing still works.
  • No server logs, no rate limits, no signup, no daily quota.

Related guides

Deep-dive tutorials and tool comparisons from the iKit blog.

Common JSON Syntax Errors and How to Fix Them

Paste your JSON above — the validator pinpoints the exact line and character. These are the errors developers hit most.

Error message Cause Fix
Unexpected token } in JSON at position N A trailing comma before } or ] — JSON does not allow trailing commas. Delete the comma after the last item: {"a": 1,} → {"a": 1}
Unexpected token ' in JSON at position N Single quotes around keys or values — JSON requires double quotes. Replace 'value' with "value" on every key and string.
Unexpected token N in JSON at position N A bare word like NaN, None or undefined — none are valid JSON values. Use null, a number, or a quoted string instead.
Expected property name or '}' / Expecting 'STRING' An unquoted object key: {name: "x"} — keys must be double-quoted strings. Quote the key: {"name": "x"}
Unexpected end of JSON input The text was truncated — an unclosed brace, bracket or string. Check that every { has a } and every [ has a ] — the tree view shows where it stops.
Unexpected token / in JSON at position N Comments (// or /* */) — the JSON spec does not allow them. Remove the comments, or keep config in JSONC/YAML and convert before parsing.
Bad control character in string literal A raw newline or tab inside a string. Escape it: use \n, \t or \u escapes inside the quotes.

JSON Data Types & Escaping Rules

Everything JSON allows — and the things it famously doesn't (comments, trailing commas, single quotes).

TypeExampleNotes
string"hello"Double quotes only
number3.14, -2, 1e9No NaN, Infinity or leading zeros
booleantrue, falseLowercase only
nullnullNot None or nil
object{"key": "value"}Keys must be quoted strings
array[1, "a", null]Mixed types allowed
EscapeMeaning
\" \\ \/Quote, backslash, slash
\n \r \tNewline, return, tab
\b \fBackspace, form feed
\uXXXXUnicode code point (4 hex digits)
Not allowed: comments, trailing commas, single quotes, unquoted keys

Frequently Asked Questions

Will this tool upload my JSON data?

No. All parsing and formatting happen entirely in your browser. Your data never leaves your device.

How large a JSON can it handle?

Most modern browsers handle 1–10 MB smoothly. Very large files (>20 MB) may become slow or lag; consider a CLI tool for those.

Why do I get an "Unexpected token" error?

Usually missing quotes, a trailing comma, or using single quotes. Switch to the "Errors" tab to see the exact row and column.

Does it support JSON5 or JSON with comments?

Only strict RFC 8259 JSON is supported. Let us know if JSON5 / JSONC support would help you.

Can I use it offline?

After the first load most assets are cached by your browser, so it works with or without a network connection.

Can JSON have comments?

No — the JSON spec (RFC 8259) does not allow comments, and parsers reject them with a syntax error. If you need commented config files, look at JSONC or YAML instead, then convert to pure JSON before parsing.

Is JSON case sensitive?

Yes. Keys and string values are case sensitive ("Name" and "name" are different keys), and the literals true, false and null must be lowercase — True or NULL is a syntax error.

What are the JSON data types?

JSON has exactly six types: string (double quotes only), number (no NaN or Infinity), boolean (true/false), null, object, and array. Anything else — dates, undefined, functions — must be represented as one of these, usually a string.

What's the difference between a JSON formatter and a JSON validator?

A formatter re-indents JSON so it's readable (pretty-print) or strips whitespace (minify). A validator checks it against the JSON grammar and reports where it breaks. This tool does both at once: it validates as you type and shows the exact line and character of the first error.

Can I convert JSON to YAML or CSV?

Yes — use the other iKit tools: JSON ↔ YAML converter at jsonyaml.ikit.app and CSV ↔ JSON at csvjson.ikit.app. To compare two JSON files use the Diff Checker, and to compress JS/CSS use the Minifier — all free and browser-only like this one.