Live validation
Checks your JSON on every keystroke and tells you whether it is valid.
Validate, auto-fix, beautify and convert JSON to XML, YAML, CSV, TypeScript, Python and Markdown. Free, no sign-up, and everything runs in your browser.
Errors show the exact line and column, and Auto-fix repairs trailing commas, unquoted keys, single quotes and comments.
Pretty, minified, escaped, XML, YAML, CSV, TypeScript, Python and Markdown. XML, YAML and CSV can be converted back to JSON, and a graph view maps the structure.
Your data never leaves the page. Nothing is uploaded; history stays in your own browser.
JSON (JavaScript Object Notation) is the plain-text format most APIs, config files and databases use to exchange data. It is simple, but one stray comma or quote makes the whole document unreadable to a program.
This free online tool gives you three jobs in one workspace. It validates your JSON and points to the exact error, it formats it so people (or machines) can read it easily, and it converts it to and from other formats such as XML, YAML, CSV, TypeScript, Python and Markdown.
Checks the syntax and shows line and column.
Beautifies, minifies, indents and sorts keys.
Moves data between JSON and 10 output formats.
{
name: 'Broken',
// comment
items: [1, 2, 3,],
ok: True,
}{
"name": "Broken",
"items": [
1,
2,
3
],
"ok": true
}The everyday JSON headaches developers hit, and how each one is solved here.
| The problem | What you usually see | How this tool helps |
|---|---|---|
| You cannot find the error | “Unexpected token” with no obvious location | Shows the line and column, highlights the line, and links straight to it. |
| Trailing commas, single quotes, unquoted keys, comments | Parsers reject JSON that looks fine in JavaScript or Python | Auto-fix cleans them in one click. |
| Python or JS values in JSON | True, False, None, undefined | Auto-fix converts them to true, false and null. |
| Unreadable one-line JSON | A wall of text from an API or log | Beautify, Tree and Graph views make it readable. |
| Escaped JSON inside a string | Backslashes and \" everywhere | Unescape string reveals the real JSON; Escape string does the reverse. |
| Data needed in another format | YAML for config, XML for legacy systems, CSV for spreadsheets | Convert to XML, YAML, CSV, Python or a Markdown table, or convert them back to JSON. |
| Hand-writing types | Slow and error-prone for big responses | TypeScript output generates an interface from a sample payload. |
| Data does not match the contract | Missing fields or wrong types slip through | Schema tab lists every mismatch. |
| “What changed between these responses?” | Manual eyeballing of two payloads | Compare shows additions, removals and changes. |
| Pasting private data into unknown sites | Tokens, customer data and internal payloads leave your machine | Everything runs locally in your browser, so nothing you paste is uploaded. |
What each button and tab means, and exactly how to use it.
Checks your JSON on every keystroke and tells you whether it is valid.
Marks the broken line in the editor so you never hunt for a missing comma.
Repairs common mistakes: comments, trailing commas, single quotes, unquoted keys and True/False/None.
Beautify adds indentation for reading. Minify strips all whitespace for the smallest payload.
Choose 2 spaces, 4 spaces or tabs, and optionally sort every key alphabetically at all depths.
Escape turns text into a quoted string with escape characters. Unescape reverses it.
Bring data in by paste, file, drag-and-drop, URL or built-in samples.
Start from JSON, YAML, XML or CSV and turn any of them into JSON or another format.
Pretty JSON, minified JSON, escaped and unescaped text, XML, YAML, CSV, TypeScript, Python dict and Markdown table.
Take the result with you or feed it into another conversion.
Shows the size of your input and of the output in the chosen format, with line counts and how much bigger or smaller the output is.
Fold any object, array or block to focus on the part you care about. It works on JSON, YAML, XML, TypeScript and Python output, and in the Tree view.
Line numbers stay correct while sections are folded, and Wrap makes long strings readable without side-scrolling.
Explore nested data by expanding and collapsing nodes, and search keys, values or JSONPath.
$.items[*].name, then click a hit to copy its path. Expand all, Collapse all and the depth menu work here too.Draws your JSON as connected boxes so the shape of a large payload is obvious at a glance.
Validates your data against a JSON Schema (draft-07 subset) and lists every mismatch.
Shows what was added, removed or changed between two JSON documents.
Remembers your last 15 conversions in this browser so you can get back to earlier work.
Creates a link that reopens your JSON exactly as it is.
Gives you a bigger workspace and lets you rebalance the input and output panels.
Five steps from pasted text to a clean, converted result.
Paste, open a file, drop one on the editor, load a URL or start from a sample. Pick the Input format first if it is not JSON.
You get either ✔ Valid with size, lines, keys and depth, or the exact line and column of the problem.
Click Auto-fix for common mistakes, then Beautify or Minify. Set the indent and tick Sort keys if you want.
Switch between Output, Tree, Graph, Schema and Compare, and pick an output format such as YAML or CSV.
Copy the result, download it as a file, or use it as the next input. Share or History if you need to come back.
Copied from JavaScript, Python or a config file
Turn an API array into a spreadsheet
Type an API response in seconds
Move between config formats
Check a payload matches its contract
Spot exactly what changed
One JSON document, ten ways to use it. Below is the same data converted by this tool.
| Output | What you get | Best for |
|---|---|---|
| JSON (pretty) | Indented, readable JSON | Debugging, code review, docs |
| JSON (minified) | All whitespace removed | Smaller payloads, embedding in config |
| Escape string | JSON as a quoted, escaped string | Putting JSON inside another string or code |
| Unescape string | Escape sequences turned back into text | Reading JSON copied from logs |
| XML | Nested elements under a root tag | Legacy and SOAP-style integrations |
| YAML | Indented key: value config | Kubernetes, CI/CD, app config |
| CSV | Header row plus one row per object | Excel, Google Sheets, data import |
| TypeScript | An export interface Root type | Typing API responses |
| Python dict | A data = {…} literal | Scripts, tests, fixtures |
| Markdown table | Pipe-separated table | READMEs, docs, GitHub issues |
{"id":101,"name":"Asha Rao","active":true,"tags":["api","json"],"address":{"city":"Mumbai","zip":"400001"}}id: 101 name: Asha Rao active: true tags: - api - json address: city: Mumbai zip: "400001"
export interface Root {
id: number;
name: string;
active: boolean;
tags: string[];
address: {
city: string;
zip: string;
};
}<?xml version="1.0" encoding="UTF-8"?>
<root>
<id>101</id>
<name>Asha Rao</name>
<active>true</active>
<tags>api</tags>
<tags>json</tags>
<address>
<city>Mumbai</city>
<zip>400001</zip>
</address>
</root>Tip: CSV and Markdown table work best with an array of objects. Nested objects are flattened into dotted column names such as address.city.
Small time-savers for heavy JSON days.
| Shortcut | What it does |
|---|---|
| Ctrl/⌘ + Enter | Beautify |
| Ctrl/⌘ + Shift + Enter | Minify |
| Tab | Insert one indent level in the editor |
| Esc, then Tab | Leave the editor with the keyboard (accessibility) |
| Esc | Exit full screen |
| Double-click a tree node | Copy its path |
Quick answers about validating, fixing and converting JSON.
A JSON validator checks whether text follows the JSON syntax rules and reports the exact line and column of the first problem. This tool validates as you type, so you know at once whether an API, app or config loader will be able to parse your JSON.
A validator checks that JSON is correct. A formatter (beautifier or minifier) only changes whitespace so JSON is easier to read or smaller to send. A converter turns the same data into another format such as XML, YAML, CSV or TypeScript. This page does all three in one workspace.
The usual causes are trailing commas, single quotes instead of double quotes, unquoted keys, comments, missing commas or brackets, and Python-style True, False or None. The status bar shows the line and column, and the Auto-fix button repairs the common syntax mistakes in one click.
Auto-fix repairs syntax only: it removes comments and trailing commas, converts single quotes to double quotes, quotes bare keys, and turns True, False, None and undefined into true, false and null. Values are not otherwise rewritten, but review the result before you use it. Structural errors such as a missing bracket cannot be repaired automatically.
Paste a JSON array of objects, choose CSV in the output format menu, then use Copy or Download (the file is saved as converted.csv). Nested objects are flattened into dotted column names such as address.city, and nested arrays are kept as JSON text inside the cell.
Yes. Set the Input menu to YAML, XML or CSV, paste your data or drop a .yaml, .xml or .csv file, and choose JSON as the output. The Use as input button lets you chain one conversion into the next.
In the Output tab use Expand all, Collapse all or the depth menu to open a set number of levels, or click the arrow next to any line to fold just that node. The same controls are in the Tree tab. Folding only changes what you see: Copy and Download always use the full text. The input box is an editable text area, so use Beautify and then fold in the Output or Tree tab.
The Input panel shows the size and line count of what you pasted, and the output toolbar shows the size of the converted result and its percentage change against the input. Hover either badge for the character count.
JSONPath is a query syntax for picking values out of JSON, for example $.items[*].name returns the name of every item. Open the Tree tab, type the expression into the search box, and click a result to copy its path. Plain text search on keys and values works too.
No. Validation and conversion run in your browser and nothing you paste is sent to a server. History is kept only in your own browser storage and can be cleared at any time. Two features touch the network only when you use them: From URL fetches the address you type directly from your browser, and Share places your data in the link itself, so anyone you give that link to can read it.
There is no fixed limit, but because everything runs locally, very large files depend on your device's memory. History skips inputs over 200,000 characters and Share links work for inputs up to 3,000 characters, so use Download for bigger data.
It supports a practical draft-07 subset: type, required, properties, items, enum, minimum and maximum, string and array length limits, pattern, additionalProperties and anyOf. Each mismatch is listed with where it occurred in your data.
Yes. It is free to use, with no account or sign-up required.
Need sample data to test with? Try our Mock Data Generator. Explore more free developer tools, read our tutorials, or talk to us about custom tools and APIs.