JSON Editor
Edit JSON data with an interactive tree editor or code view.
About JSON Editor
JSON Editor is a free online tool that lets you modify the actual content of a JSON document — changing values, renaming keys, adding properties, removing nodes, formatting whitespace, and minifying output — all without installing any software. It provides two complementary editing modes side by side: a code view with a plain text area where you type raw JSON with Format and Minify shortcuts, and an interactive tree view that renders every object and array as an expandable, clickable hierarchy you can edit directly by double-clicking any value or key name.
The tree editor is what sets this tool apart from a plain formatter or viewer. In tree mode you can double-click any string, number, boolean, or null to edit it inline; double-click an object key to rename it without touching surrounding syntax; hover over any object or array node to reveal an add (+) button that inserts a new key-value pair or array element; and click the delete button to remove a node cleanly — brackets, commas, and indentation all stay correct automatically. Switching back to code view serialises your tree edits to properly formatted JSON text.
Everything runs entirely inside your browser using standard JavaScript. Your JSON is never uploaded, transmitted to a server, or stored anywhere. That means you can paste API credentials, internal configuration files, and production data without any privacy concern. There are no file-size limits, no accounts, and no cost.
Key Features
Interactive tree editor
Expand objects and arrays as a clickable hierarchy. Edit any value inline by double-clicking, rename keys without touching surrounding syntax, add properties, and delete nodes — commas and brackets stay correct automatically.
Dual code and tree views
Switch freely between a raw text editor and the interactive tree. Edits made in tree mode are serialised to correctly formatted JSON the moment you return to code view.
Format and Minify in one click
In code view, Format re-indents your JSON with two-space indentation; Minify strips all whitespace to produce the smallest possible string. Both operations validate the JSON first and show an inline error if parsing fails.
File upload support
Load any .json or .txt file directly from your machine using the upload button. The file is read locally by the FileReader API — no network request is made.
Inline syntax validation
As soon as the JSON becomes invalid during code editing, a red error bar appears showing the exact parse error message, so you can fix problems before switching to tree view.
100% client-side privacy
All parsing, editing, formatting, and validation happen in your browser with no server calls. Paste API keys, production configs, or any sensitive data without concern.
How to Use
Load Your JSON
Paste JSON into the code editor, upload a .json file, or click "Sample" to load example data.
Edit Your Data
Use Code view to edit raw text with Format and Minify buttons, or switch to Tree view to visually edit values, add properties, rename keys, and delete nodes.
Copy the Result
Click the copy button to copy your edited JSON to the clipboard, ready to use in your project.
Example
Paste a minified or messy JSON string into code view, click Format, then switch to tree view to rename a key or change a value inline — the result is clean, edited JSON ready to copy.
{"user":{"id":42,"name":"alice","role":"viewer","active":true},"tags":["beta","trial"],"quota":null} {
"user": {
"id": 42,
"name": "alice",
"role": "admin",
"active": true
},
"tags": [
"beta",
"trial"
],
"quota": null
} Common Use Cases
- arrow_circle_right
Patching API response fixtures
Grab a live API response, paste it in, and use tree view to change specific field values — user IDs, status flags, nested settings — before saving it as a test fixture. No regex surgery on raw JSON strings.
- arrow_circle_right
Editing app configuration files
Configuration files like package.json, tsconfig.json, or custom app configs are easier to modify in tree view when you need to add a new key inside a deeply nested object without risking a stray comma.
- arrow_circle_right
Renaming keys during data migration
When a schema changes and field names need updating — for example renaming "userId" to "user_id" across a payload — the inline key-rename feature lets you do it accurately without touching surrounding JSON syntax.
- arrow_circle_right
Building mock data for frontend development
Construct realistic nested mock objects by starting with the Sample data, then editing values and adding or removing properties in tree view to match the shape your components expect.
- arrow_circle_right
Preparing JSON for size-sensitive environments
Use the Minify button in code view to strip all whitespace before embedding JSON in an environment variable, a URL parameter, or an HTTP body where payload size matters.