JSON Formatter, validator and converter
Format, validate, minify and convert JSON in your browser. Six output modes: pretty, tree, TypeScript, JSON Schema, CSV and YAML. Live error pointing, duplicate-key detection and auto-fix. No upload, no sign-up.
- Line and column error pointing
- Tree view with type badges
- Auto-fix broken JSON
- Works offline
Shortcuts: Ctrl+Enter format · Ctrl+Shift+M minify
Formatted output appears here
Paste JSON on the left, or load one of the samples to see every output mode.
All processing happens in your browser. Nothing you paste is ever uploaded or stored.
- 100% Secure
- No Upload
- Live Validation
- 6 Output Modes
- Auto-Fix
- No Sign-up
Every output mode explained
Same input, seven views. Switch tabs to see the format that fits what you need.
| Mode | What it produces | Best for |
|---|---|---|
| Pretty | Formatted, indented JSON with configurable indent | Reading, debugging, diffs in code review |
| Minified | Compact JSON with no whitespace | Sending over the wire, reducing file size |
| Tree | Collapsible explorer with type badges on every value | Exploring large or deeply nested payloads |
| TypeScript | Exported interfaces and types inferred from the data | Typing an API response in a TS project |
| Schema | Draft-07 JSON Schema with types and required fields | API contracts, form validation, tooling |
| CSV | Comma-separated rows from an array of flat objects | Opening the data in a spreadsheet |
| YAML | Spec-compliant YAML with quoted strings where needed | Kubernetes, GitHub Actions, Docker Compose |
What auto-fix repairs
The five most common reasons valid-looking JSON is rejected by strict parsers, all fixed in one click.
| Problem | Auto-fix result |
|---|---|
| JavaScript comments (// and /* */) | Comments removed |
| Single-quoted strings | Converted to double quotes with correct escaping |
| Trailing commas before } or ] | Commas removed |
| Unquoted object keys | Keys wrapped in double quotes |
| Python literals (True, False, None) | Converted to true, false, null |
Why this beats other JSON formatters
Most online JSON tools stop at pretty-print and minify. This one covers six output modes, detects real problems and fixes broken input.
| Feature | TToolDeck | Typical online tools | Desktop JSON apps |
|---|---|---|---|
| No sign-up or email | Yes | Partial | No |
| No upload, JSON stays in your browser | Yes | No | No |
| Works offline after first load | Yes | No | Yes |
| Live validation with line and column | Yes | Partial | Partial |
| Tree view with collapsible nodes | Yes | Partial | Yes |
| Duplicate-key detection | Yes | No | No |
| Auto-fix comments and trailing commas | Yes | No | Partial |
| Export TypeScript interfaces | Yes | No | Partial |
| Export JSON Schema (draft-07) | Yes | Partial | Partial |
| Export CSV from array of objects | Yes | Partial | Partial |
| Export YAML | Yes | Partial | Yes |
| No ads blocking the input | Yes | No | Yes |
Comparison reflects publicly available information at the time of writing. Features may change. Representative examples of common patterns.
More free developer tools
Free browser-based tools. Nothing uploaded, ever.
JSON Formatter
You are hereFormat, validate, minify and convert JSON
QR Code Generator
QR codes for URLs, WiFi, WhatsApp and more
Password Generator
Strong random passwords of any length
Case Converter
UPPERCASE, lowercase, Title Case, camelCase
CSV Formatter
Comma keywords to semicolons for stock sites
Word and Character Counter
Words, characters, reading time and limits
Favicon Generator
Full favicon set from a single image
Base64 Encoder
Encode and decode Base64 or URL strings
HTML to PDF
Convert a web page or HTML file into a PDF
How it works
- 1
Paste your JSON
Drop any JSON into the input, a full API response, a config file, a single object. The tool validates it live and shows the exact line and column of any error.
- 2
Choose what you need
Format with 2, 4 or tab indents, minify, sort keys, or fix broken JSON that uses comments, single quotes or trailing commas. Then switch to the output tab you need.
- 3
Copy or download
Every output has a Copy button and a Download button with the right file extension and MIME type, .json, .ts, .csv or .yaml.
Everything you get for free
Six output modes in one tool
Pretty, Tree, TypeScript, JSON Schema, CSV and YAML, all from the same input. Switch tabs instantly, no re-parsing, no round trips. Most formatters stop at pretty and minified.
Live error pointing with line and column
The moment your JSON is invalid, the tool shows the exact line, column and a small excerpt of the offending region. No more guessing where the stray comma is.
Duplicate-key detection
JSON silently drops duplicate keys when parsed, a hidden bug in any config file. The tool scans your input and lists every duplicate key so you can fix the source, not just the symptom.
Auto-fix broken JSON
Paste JSON that has JavaScript comments, single quotes, trailing commas, unquoted keys or Python-style True/False/None. One click removes each issue, tells you exactly what it changed, then re-parses.
TypeScript interface export
Turn any JSON object into a proper TypeScript interface, including nested objects and arrays. Name-safe keys get quoted automatically, and nested objects get their own named interfaces. Paste the output straight into a .ts file.
JSON Schema draft-07 export
Generate a valid draft-07 JSON Schema with types, nested properties and required fields. Perfect for API contracts, form validation and tooling that consumes schemas.
Tree view for exploring large JSON
Collapse and expand objects like a file tree. Objects and arrays open by default at shallow depths so you can see the shape, and stay collapsed deeper where noise lives. Every scalar shows a colour-coded type badge.
CSV and YAML export
If your JSON is an array of flat objects, the tool builds a proper CSV with a union of all keys and correct quoting. If it is any shape at all, it emits clean, spec-compliant YAML.
What people use it for
Debug an API response
Paste a raw API response into the tool. Live validation shows the exact spot if the response is malformed, and the tree view lets you explore deep payloads without drowning in braces.
Clean up a config file
Found a config with comments, trailing commas and single quotes that some tool rejected? Auto-fix normalizes it back to strict JSON in one click, then format to whatever indent the project uses.
Generate TypeScript types
Got a sample API response and need an interface? Paste the JSON, switch to the TypeScript tab, and copy the output. Nested objects get their own named interfaces automatically.
Convert JSON to CSV
Export data that came back as JSON into a spreadsheet-friendly CSV. The tool takes the union of all keys across every row, so nothing is silently dropped.
Build a JSON Schema
Need a schema for an API contract or validation library? Paste a representative payload and the tool emits a ready draft-07 schema with types and required fields.
Convert JSON to YAML
Moving config from JSON to YAML for Kubernetes, GitHub Actions or Docker Compose? Paste the JSON, switch to YAML, and copy the clean output.
Questions people ask
What does a JSON formatter do?
A JSON formatter takes raw JSON text and rewrites it in a readable, indented form. It also validates the JSON, if there is a syntax error, a good formatter tells you exactly where. This tool goes further: it also minifies, sorts keys, detects duplicate keys, auto-fixes common mistakes, and exports to TypeScript, JSON Schema, CSV and YAML.
Is my JSON uploaded to a server?
No. The tool runs entirely in your browser using the built-in JSON parser and a lightweight tree renderer. Nothing you paste is sent to any server, stored, or logged. You can verify by opening your browser dev-tools Network tab, you will see no request carrying your data.
How does the tool find errors and report line and column?
The browser's native JSON.parse throws an error with a message that includes either a character position or a line and column pair, depending on the engine. The tool reads that message, converts character positions to line and column for V8-based browsers, and shows a short excerpt of the offending region so you can spot the stray comma or missing quote.
What are duplicate keys and why do they matter?
JSON allows the same key to appear more than once inside an object, but most parsers silently keep the last occurrence and drop the rest. That means a config file with two identical keys behaves differently from what you wrote, with no warning. The tool scans your input and lists every duplicate key so you can fix the source.
What does the auto-fix do?
Auto-fix handles the five most common reasons valid-looking JSON is rejected by strict parsers: JavaScript-style comments, single-quoted strings, trailing commas, unquoted object keys, and Python literals (True, False, None). It lists exactly what it changed so you can review before committing to the fixed version.
Can I convert JSON to a TypeScript interface?
Yes. Switch to the TypeScript tab and the tool generates exported interfaces inferred from your data. Nested objects get their own named interfaces, arrays become correctly typed arrays, and keys that are not valid identifiers get quoted. Paste the output directly into a .ts or .tsx file.
Can I convert JSON to CSV?
Yes, if your JSON is a top-level array of flat objects. The tool takes the union of all keys across every row so nothing is dropped, quotes values that contain commas or newlines correctly, and outputs a spec-compliant CSV. Nested objects inside a row are JSON-stringified into a single CSV cell.
Can I convert JSON to YAML?
Yes. Switch to the YAML tab and the tool emits clean, spec-compliant YAML with correct indentation, quoted strings where needed, and proper handling of arrays, nested objects, numbers, booleans and nulls. Useful when moving config from JSON to Kubernetes, GitHub Actions or Docker Compose.
What is the difference between formatting and minifying?
Formatting adds indentation and line breaks to make JSON human-readable. Minifying removes every possible whitespace character to make the file as small as possible for transmission. The tool shows both sizes and the percentage saved so you can see the impact of minification on your specific data.
Does it work on large JSON files?
Yes. The tool parses and formats as fast as your device can. Very large payloads (tens of megabytes) will use more memory in the browser, and the tree view can get heavy, for those, use the Pretty, Minified or CSV tabs which are simpler. There is no hard size limit imposed by the tool.
Does it work offline?
Yes. After the page loads, everything, parsing, formatting, transforming, exporting, runs entirely client-side. Disconnect your internet and the tool keeps working. Only the initial page load and fonts require a connection.
Is it free, and can I use it at work?
Yes, completely free for personal and commercial use. No sign-up, no email, no daily limit, no watermark on output. If you are working with confidential JSON, the fact that nothing is uploaded makes this tool safe to use on company data.
Your JSON never leaves your device
The tool parses, formats and transforms everything using your browser's built-in JSON engine and a lightweight tree renderer. Nothing you paste is uploaded, stored or logged. Open your dev-tools Network tab while you use it, you will not see your data being sent anywhere. Read how we keep it private.