Open or paste JSON and edit it two ways at once: a tree where you add, rename, reorder and retype values with a click, and a code view that stays in sync and checks every keystroke. Undo anything, then download the result.
Last updated:
Tree$
The code has an error. Fix it on the right to keep editing the tree.
Drag ⋮⋮ to reorder or move into another object/array. Alt + ↑/↓ moves the focused row.
Code
1
Valid JSON
Advertisement
Advertisement
How to use the JSON Editor
Open a JSON file, paste JSON into the code view, or start from the sample or an empty object.
Edit in the tree: click a key or value to change it, use the type menu to convert it, and + to add a key or item.
Reorder by dragging the ⋮⋮ handle, with the ↑ ↓ buttons, or with Alt + arrow keys. Drop onto the middle of an object or array to move a node inside it.
Or edit the code directly. Valid changes update the tree instantly; errors are shown with their line and column.
Undo any mistake, choose the indentation, then Download or copy your JSON.
Tree editor actions
To do this
In the tree
Keyboard
Change a value
Click the value, type, then press Enter or click elsewhere
Tab to the field, Enter to apply
Rename a key
Click the green key name and type
Enter to apply
Add a key or item
+ on an object or array row
Tab to +, then Enter
Change the type
The small type menu (object, array, string, number, boolean, null)
Arrow keys in the menu
Reorder
Drag ⋮⋮, or the ↑ ↓ buttons
Alt + ↑ / Alt + ↓
Move into another container
Drop onto the middle of an object or array row
-
Copy a node
⧉ duplicates it right below
-
Delete
✕ on the row
-
Undo / redo
↶ Undo and ↷ Redo buttons
Ctrl + Z / Ctrl + Y (outside text fields)
Collapse or expand
▸ / ▾ or click the { n keys } summary
Enter on the arrow
JSON value types
Type
Example
Notes
object
{"id": 7, "name": "Ann"}
Keys are always double-quoted strings. Order is kept but has no meaning to most programs.
array
[1, "two", null]
Ordered list; items can mix types.
string
"Hello\nWorld"
Double quotes only; line breaks, tabs, quotes and backslashes are escaped.
number
42, -3.5, 1.2e6
No leading zeros, no +, no NaN or Infinity. Many parsers lose precision beyond 253.
boolean
true, false
Lowercase only.
null
null
An intentionally empty value.
Tips for editing JSON safely
Use the tree for structure, the code for bulk edits. Reordering, retyping and adding keys is quicker in the tree; pasting a long block or search-and-replace is quicker in the code view.
Watch the status bar. It shows the number of keys, array items and nesting depth, so you can see at a glance whether a paste or delete did what you expected.
Copy the path of the selected node (for example $.sizes[1].available) to use in code, JSONPath queries or documentation.
Keep IDs as strings when they have leading zeros or more than 15 digits, such as ZIP codes or Twitter-style IDs, so other programs cannot round or trim them.
Frequently asked questions
How do I edit a JSON file?
Open the file with Open file or paste its content into the code view. Change values directly in the tree or in the code, then press Download JSON to save the edited file. Your edits stay in your browser; nothing is uploaded.
What happens when I change a value's type?
The value is converted where it makes sense: the string "42" becomes the number 42, a number becomes its text, an array becomes an object with keys 0, 1, 2 and an object becomes an array of its values. A string that contains JSON, such as "[1,2]", is parsed into a real array or object.
Will the editor change my numbers or key order?
No. Keys stay in the order you wrote them, even numeric keys that JavaScript would normally sort first, and numbers keep their exact digits, so large IDs such as 9007199254740993 are not rounded.
Why is the tree locked?
The code view contains invalid JSON, so it cannot be shown as a tree. The status bar under the code shows the line, column and reason; fix it or press Undo and the tree unlocks.
Can I move a value into another object or array?
Yes. Drag the ⋮⋮ handle onto the middle of an object or array row to move it inside, or onto the top or bottom edge of any row to place it before or after. A value moved into an object from an array gets a unique key such as item, which you can rename.
What does a highlighted key mean?
The same key appears twice in one object. JSON allows it, but most parsers keep only the last value, so rename or delete one of them.
How large a file can I edit?
Files of several megabytes work. For big documents, deeper levels start collapsed and the tree shows up to 3,000 rows at a time; the code view always holds the whole file.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.