JSON Editor Online
A JSON editor to edit, format, minify and validate JSON, with exact line and column for every error.
Valid JSON· object · 145 B
How to use the JSON editor
- Paste or type JSON into the editor, or use Open file to load a
.jsonfile from your device. - The JSON is validated as you type. A green Valid JSON message means it parses correctly; otherwise you see the line, column and cause of the first error.
- Choose Format to indent it (2 spaces, 4 spaces or tabs) or Minify to remove all whitespace. Press
Ctrl + Zto undo either. - Copy the result or Download JSON to save a file.
Format, minify and validate JSON online
This JSON editor online is built for everyday API and config work: tidy up a minified response so you can read it, shrink a file before sending it, or find the exact character that makes a document invalid. It checks standard JSON strictly and explains problems in plain language instead of a generic “unexpected token”.
Formatting never changes your data — only whitespace. For example, this minified JSON:
{"name":"Ada","languages":["en","fr"],"active":true}{
"name": "Ada",
"languages": [
"en",
"fr"
],
"active": true
}Common JSON errors and how to fix them
Most invalid JSON comes from writing it like JavaScript. These are the mistakes the validator reports most often:
| Problem | Invalid | Valid |
|---|---|---|
| Trailing comma after the last item | {"a": 1, "b": 2,} | {"a": 1, "b": 2} |
| Single quotes instead of double quotes | {'name': 'Ada'} | {"name": "Ada"} |
| Property name without quotes | {name: "Ada"} | {"name": "Ada"} |
| Missing comma between properties | {"a": 1 "b": 2} | {"a": 1, "b": 2} |
| Comments | {"a": 1 // note} | {"a": 1} |
| JavaScript-only values | {"a": undefined, "b": NaN} | {"a": null, "b": null} |
More JSON tools for specific jobs
This editor is the all-rounder. When you have one specific task, these tools go further:
- JSON formatter — pretty print side by side, with optional alphabetical key sorting for clean diffs.
- JSON validator — detailed error report and automatic repair of trailing commas, single quotes and other common mistakes.
- JSON minifier — the smallest possible JSON, with the exact bytes saved.
- Converters: JSON to CSV and CSV to JSON for spreadsheets, JSON to XML and XML to JSON, and JSON to YAML and YAML to JSON for config files.
Other tools
Building a web page rather than working with data? Try the online HTML editor with live preview. For quick plain-text notes that save automatically, use the online notepad. Working with markup instead of data? The HTML formatter beautifies HTML the same way this editor formats JSON.
Frequently asked questions
- Is my JSON uploaded or stored anywhere?
- No. Formatting, minifying and validation all run in your browser. Files you open are read locally and never uploaded, and nothing is saved after you close the page — download your JSON if you want to keep it.
- Does formatting change my data?
- No. Only whitespace changes. Numbers are kept exactly as written (for example 1.0 or very large integers), and key order and duplicate keys are preserved.
- How do I find where my JSON is broken?
- The editor validates as you type. When there is an error it shows the line and column, a plain-language description, and the line with a marker under the problem. Click Go to error to jump straight to it.
- Does it support comments or trailing commas?
- No. The editor checks standard JSON (RFC 8259), which does not allow comments, trailing commas, single quotes or unquoted property names. It tells you exactly where these appear so you can remove them.
- What is the difference between formatting and minifying?
- Formatting (beautifying) adds line breaks and indentation so JSON is easy to read. Minifying removes all unnecessary whitespace so the file is as small as possible for sending or storing.
- How large a file can I open?
- Files up to 10 MB can be opened. Very large documents may make typing slower, depending on your device.
Related tools
- JSON formatter and beautifierBeautify and pretty print JSON, optionally sorting keys.
- JSON validatorValidate JSON with exact errors and automatic repair.
- JSON minifierCompress JSON and see how many bytes you save.
- JSON to CSV converterConvert JSON arrays to CSV tables.
- JSON to YAML converterConvert JSON to readable YAML.