JSON Editor

Edit JSON visually — rename keys, change types, add or delete nodes, with undo/redo and instant export.

{
$
empty — use + to add a property
}
In sync

Type-aware editing

Inputs adapt to each value: text for strings, number for numbers, dropdown for booleans, plus instant type switching.

Restructure the tree

Add or remove object properties and array items, rename keys safely, and rebuild nested structures with a click.

Undo and redo

Every change is reversible. Experiment freely and roll back any mistake without losing the rest of your work.

When a tree editor beats a text editor

Hand-editing JSON is fast for small tweaks but error-prone the moment a document grows: a missing comma, an unbalanced bracket, or a typo in a key invalidates the whole file. A tree editor enforces the grammar for you. Keys are always quoted, types always match, brackets always balance, and the exported output is guaranteed to parse on the first try.

A round-trip workflow

The editor is designed as a two-way bridge between text and tree. Paste existing JSON into the source panel and apply it to the editor; mutate the tree with the visual controls; and the source panel updates in real time with the new document. Copy or download the result when you are happy, and the JSON you receive is strictly conformant to ECMA-404 and ready to ship.

Common use cases

  • Authoring test fixtures and mock API responses.
  • Cleaning up an API payload before committing it to a snapshot test.
  • Renaming or removing fields from a configuration file without risking syntax errors.
  • Reshaping a small dataset between formats — paste JSON, tweak, export.

Frequently asked questions

What is a JSON editor?

A JSON editor is an interactive tool for changing the contents of a JSON document without writing raw text. Each value becomes an editable field, each object and array becomes a node you can expand and re-shape, and the resulting JSON is regenerated automatically. It is the safest way to edit hand-written configuration files, fixture data, and API mock responses because the output is always syntactically valid.

How is this different from the JSON Formatter or Viewer?

The formatter rewrites valid JSON as pretty or minified text. The viewer renders JSON as a read-only tree for exploration. The editor lets you actually mutate the document: rename keys, change types, add or delete properties and array items, and export the result. Use the editor when you need to produce a new JSON file or tweak an existing one without worrying about commas, quotes, or brackets.

How do I change a value's type?

Every node has a small type selector that switches between string, number, boolean, null, object, and array. Picking a new type replaces the value with a sensible default (an empty string, zero, false, null, {}, or []), so you can rebuild the value from there without typing JSON syntax manually.

How do I rename a key?

Click the key name (in blue) or the pencil icon that appears on hover, type the new name, then press Enter. If you choose a name that already exists at the same level the rename is refused so the object stays valid. Array indices cannot be renamed because they are positional.

Can I undo a change?

Yes. Every edit pushes a new entry onto an in-memory history stack, and the Undo and Redo buttons walk forwards and backwards through it. You can experiment freely and roll back if you delete the wrong node or change a value by mistake.

How do I import existing JSON?

Paste your JSON into the source panel on the right and click 'Apply to editor'. The editor parses the input and replaces the current document with the result. If the JSON is invalid the import is refused and the parser error is shown so you can fix it before continuing.

How do I export the result?

The source panel always reflects the current state of the tree as pretty-printed JSON. Use Copy to put the output on your clipboard or Download to save it as data.json. Both contain valid, schema-clean JSON ready to commit, post to an API, or paste into your codebase.

Is my JSON sent to a server?

No. All editing, parsing, and serialization happens entirely in your browser using JSON.parse and JSON.stringify. Nothing is uploaded, logged, or stored, which makes the editor safe for confidential configuration, fixture data, or any document containing secrets.

Does the editor support JSON5, comments, or trailing commas?

No. The editor produces strict JSON that conforms to ECMA-404 and RFC 8259. If you need comments or trailing commas, edit here, export the strict JSON, and add the relaxed features in a downstream JSON5 or JSONC step.

Part of our growing tool belt — all client-side, all free.