JSON Editor Online
A JSON editor lets you write and change JSON text and check it against the syntax in RFC 8259: objects in braces, arrays in brackets, strings in double quotes, and values that are strings, numbers, true, false, null, objects or arrays. This editor is free, needs no signup, and runs in your browser.
Edit JSON online
Type or paste JSON into the left pane; the right pane shows the result of the tab you pick. The editor has JSON syntax highlighting, line numbers and undo (Ctrl+Z or Cmd+Z). The marker above the editor says valid or errors as you type. Paste reads your clipboard, Upload opens a .json or .txt file, and you can also drop a file on the editor. The output pane has Copy and a download button.
The sample in the editor is broken on purpose: single quotes, Python True and two trailing commas. The Format tab shows it fixed and indented because Auto-repair input is on.
What you can do in the editor
- Format — indent with 2 or 4 spaces, and sort keys A–Z if you want. Same as the formatter.
- Validate — the first syntax error with its line and column. Same as the validator.
- Repair — fix broken JSON and list each change. Same engine as the repair tool.
- Tree — browse the structure. For a larger tree with type labels and copy-path, use the JSON viewer.
- Minify — one line, with the size saved. See the minifier.
- Diff — compare the editor against a second document. See JSON diff.
- Convert — CSV, YAML, XML or SQL. See the JSON converter.
- Query — run a JSONPath expression. See the JSONPath tester.
- Schema — a JSON Schema (draft 2020-12) or TypeScript types from the sample. See the schema generator.
The full workspace with the JWT decoder is JSON Studio.
Fix broken JSON while you edit
Switch to Repair to fix the text and see what changed. The engine handles the faults that language models and hand-edited files produce most often. Each result below was produced by the engine, and the repaired output parses as valid JSON:
| Problem | Invalid JSON | Reported error | Repair result |
|---|---|---|---|
| Trailing comma | {
"a": 1,
"b": 2,
} | Line 4, column 1: Trailing comma — remove the comma before the closing }. | {"a":1,"b":2} |
| Single quotes | {
'a': 1
} | Line 2, column 3: Property names must use double quotes ("), not single quotes. | {"a":1} |
| Unquoted key | {
a: 1
} | Line 2, column 3: Property names must be wrapped in double quotes. | {"a":1} |
| Comment | {
// note
"a": 1
} | Line 2, column 3: Comments are not allowed in JSON — remove them. | {"a":1} |
| Python True | {"a": True} | Line 1, column 7: "True" is not a JSON value — use true, false or null (lowercase), and quote anything else. | {"a":true} |
| Markdown code fence | ```json
{"a":1}
``` | Line 1, column 1: Unexpected character "`" where a value was expected. | {"a":1} |
| Cut off (truncated) | {
"a": [1, 2 | Line 2, column 13: The array opened at line 2, column 8 is never closed — missing ]. | {"a":[1,2]} |
Repair can guess. A number with a leading zero such as 012 becomes the string "012", because the engine treats it as an ID. Read the list of changes before you use the output.
What valid JSON looks like under RFC 8259
- An object is
{ }with"name": valuepairs separated by commas. Names are strings in double quotes. - An array is
[ ]with values separated by commas. - A value is an object, array, string, number,
true,falseornull(lowercase). - Strings use double quotes only. Control characters such as a raw tab must be escaped (
\t). - Numbers are decimal: no leading zeros, no
NaNorInfinity, no hex. - No comments and no comma after the last member.
- Whitespace between tokens is free, so indentation never changes the data.
Common JSON errors and how to fix them
The editor's Validate tab reports these messages. The fix is in the message itself:
| Problem | Invalid JSON | Reported error |
|---|---|---|
| Missing comma | {"a": 1 "b": 2} | Line 1, column 9: Missing comma between properties (or a missing }). |
| NaN | {"a": NaN} | Line 1, column 7: "NaN" is not a JSON value — use true, false or null (lowercase), and quote anything else. |
| Leading zero | {"a": 012} | Line 1, column 7: Numbers cannot have leading zeros (write 7, not 07; quote it if it is an ID). |
| Raw tab in a string | {"a": "x<TAB>y"} | Line 1, column 9: Control character inside a string — escape it (e.g. \t for a tab). |
| Wrong closing bracket | {
"a": [1, 2
} | Line 3, column 1: Mismatched bracket: found } but the array opened at line 2, column 8 needs ]. |
Every parser words its errors differently; JSON errors by language has the messages from JavaScript, Python and others.
Editing JSON Schema
The site does not have a dedicated schema editor and it does not validate data against a schema you supply. What it does: the Schema tab (and the JSON Schema generator) infers a draft 2020-12 schema from a sample, with types, properties, required and items. Copy it into the editor and change it like any other JSON.
This editor compared with JSON Editor Online
If you are choosing between editors, the AI JSONMedic vs JSON Editor Online page compares the two side by side.
Use it from code
The repair engine is also an HTTP API: POST /api/repair with a JSON body {"input": "…"}, up to 2 MB, no API key. Details are in the API docs. Terms are explained in the glossary.
Privacy and limits
Editing, formatting, validating, repairing and converting run in your browser; the editor does not send your JSON to a server.
There is no fixed size limit in the editor. In desktop Chrome a 17 MB file opened and was formatted in about 1.1 seconds. The output is recomputed after every edit, so typing in a file that large is slow; to read a big file, the JSON viewer is quicker.
Frequently asked questions
Yes. It is free, needs no signup, and runs in your browser.
Yes. The input pane shows a valid or errors marker as you type, and the Validate tab gives the line and column of the first syntax error. Valid JSON must follow RFC 8259.
Yes. The Repair tab fixes common breakage such as trailing commas, single quotes, unquoted keys, comments, Python True/False/None, Markdown code fences and cut-off output, and lists each change. With Auto-repair input on, the other tabs repair first and then format, convert or show the tree.
No. RFC 8259 defines no comment syntax, so a comment makes a JSON document invalid. The Repair tab removes // and /* */ comments.
Not a dedicated schema editor. The Schema tab generates a JSON Schema (draft 2020-12) or TypeScript types from a JSON sample, which you can then edit as ordinary JSON text.
It depends on whether you need to write schemas, validate data against them or generate them. This site covers generating a schema from a sample. We do not rank other editors.
The JSON Medic newsletter
One JSON error and its fix, weekly, plus new guides and tools. Free.
We send a confirmation link first. Unsubscribe with one click in any mail. See the privacy policy.
Related JSON tools