Skip to main content

Free Online JSON Editor - Text, Tree & Table Modes

Edit JSON in the browser with a live source panel plus tree and table views. The default sample is {"name":"Ada","ok":true,"n":1}. Parsing stays on this device after the page loads - no upload, no account, and not a substitute for the JSON viewer or JSON formatter.

JSON source

Pretty-print only on the JSON formatter. Syntax-only checks live on the JSON validator.

text view

{
  "name": "Ada",
  "ok": true,
  "n": 1
}

Type: object · preview {"name":"Ada","ok":true,"n":1}

What Is a JSON Editor?

A JSON editor is an online tool that lets you inspect and change a JavaScript Object Notation document without installing VS Code, IntelliJ, or a desktop JSON IDE. A formatter pretty-prints. A viewer expands nodes. This page keeps one document in three writable views: text mode for the raw RFC 8259 source, tree mode for nested keys you can expand and edit, and table mode for arrays of objects that deserve rows and columns. Edits in the tree or table write back to the same in-memory value and re-serialize with two-space indentation.

The default document is {"name":"Ada","ok":true,"n":1}. Text mode shows that object as source. Tree mode expands name, ok, and n so you can change the string, the boolean, and the number. Table mode refuses that default on purpose: a single object is not an array of rows. Wrap it as [{"name":"Ada","ok":true,"n":1}] and the grid appears with three columns. That pair of checks is why this route exists instead of stretching the JSON viewer.

JSON powers REST and GraphQL responses, package.json, CloudFormation, Kubernetes ConfigMaps, MongoDB documents, and browser localStorage dumps. People still paste broken drafts with comments or trailing commas because those are legal in JSON5 and in JavaScript object literals. This editor follows ECMA-404 / RFC 8259. Invalid source is flagged with the first line and column. Repair a messy draft on the JSON repair tool, or confirm the JSON5 dialect on the JSON5 validator, then paste strict JSON back here.

"Offline JSON editor" means the page is a client-side JavaScript application. After HTML, CSS, and script load, parsing does not need the network. There is no file upload, no account, and no round-trip to a hosted lint API. The draft sits in localStorage under the unique key json-editor-data for up to 30 days. That is a convenience, not a backup and not a database.

How to Use the JSON Editor - Step by Step

Editing on this page takes under a minute. The document is one value shared across modes.

  1. Paste or keep the default document - The default object is {"name":"Ada","ok":true,"n":1}. Replace it with your payload. Invalid RFC 8259 JSON is flagged with a line and column before tree or table can run.
  2. Choose text, tree, or table - Text mode edits the source. Tree mode expands keys so you can change primitives in place. Table mode needs an array of objects; the default single object shows a fallback instead of a fake grid.
  3. Edit values and copy - Changes in tree or table rewrite the same document and pretty-print it with two-space indent. Click Copy when the preview matches what you want. Nothing is uploaded.
  4. Clear, fullscreen, or resize - Clear restores the Ada object. Fullscreen hides this article so a deep tree can use the screen. On a wide desktop, drag the unique json-editor-split-track handle; width is remembered in json-editor-panel-width.

Key Features of This JSON Editor

Three modes, one document

Text, tree, and table are views of the same parsed value. Switching modes does not fork the document. A tree edit of n from 1 to 2 is what you copy from text mode a moment later.

Honest table fallback

Table mode draws a grid only when the root is an array of non-array objects. Nested objects inside a cell stringify as JSON text so you can still edit them. Mixed arrays such as [1, {"a":2}] stay in tree mode instead of inventing empty columns.

Line and column on the first syntax error

Trailing commas, single quotes, comments, and unquoted keys fail with a location. This is not Auto Fix. If you need heuristic repair, use JSON repair. If you only need a pass/fail syntax report, use the JSON validator.

Copy, clear, fullscreen, resizable split

Copy writes the current pretty-printed JSON. Clear restores Ada. Fullscreen is for the right-hand view. The splitter class is unique to this tool so it cannot steal layout from the formatter or the viewer.

Private after load

No file is posted to DevOkk servers. The draft lives in this origin's localStorage for up to 30 days. Clearing site data deletes it. Multi-megabyte files belong on the JSON file processor, which will not dump the payload into localStorage.

JSON Editor Worked Example - Ada in Text, Tree, and Table

Load the page. The left panel already contains the Ada object. Text mode is a textarea of RFC 8259 source. Switch to tree: you should see three children - name = Ada, ok = true, n = 1. Change n to 2. Switch back to text. The source now includes "n": 2. That write-through is the gold-standard check for this editor.

Switch to table with the default still a single object. You get a fallback message, not a one-row spreadsheet pretending a map is a list. Wrap the object in square brackets so the root is an array of one object. Table mode then shows columns name, ok, and n. Edit a cell. Copy. You now have a JSON array you can paste into a test fixture or into JSON to CSV.

Extra drills on the same page: paste a trailing comma and read the line/column banner instead of a silent tree. Paste JSON5 unquoted keys and watch parse fail - then repair on JSON repair and come back. Duplicate a key in text mode; after parse, only the later key survives, because that is what JSON.parse does.

When You Need a JSON Editor - Real-World Use Cases

Reach for an editor when the job is to change a value, not only to stare at a tree or pretty-print a payload.

1. Patching a fixture before a failing test

A unit test expects n to be 2. The recorded fixture still has 1. Open the fixture here, change the number in the tree, copy, paste back into the repo. You did not need jq and you did not reformat the entire file in a formatter that might also reorder keys.

2. Turning an API list into a spreadsheet-shaped array

Many list endpoints return an array of objects. Table mode is the preview of that grid. If a nested address object appears as a JSON string in a cell, that is honest: a table cannot show a tree inside a cell without lying. Flatten to CSV on JSON to CSV when you need dotted columns on disk.

3. Editing localStorage or sessionStorage dumps

Copy a stringified app state from DevTools, paste it here, flip a boolean in the tree, copy the result, and write it back in the console. The viewer would show the tree; the editor is what lets you change ok without hand-editing escaped quotes.

4. Correcting a webhook sample before you write a handler

Payment, git, and CRM webhooks arrive as JSON. Paste a sample, rename a mistyped key in the tree, and copy a cleaned document into your test suite. Schema checking still belongs on the JSON Schema validator.

5. Teaching object versus array

The Ada default failing table mode is a classroom demo. Students see why {"name":"Ada"} is not a row, and why [{"name":"Ada"}] is. That lesson is lost if a tool silently wraps the object.

6. Redacting a field before you paste into a ticket

Replace a token string in the tree with REDACTED, copy, attach to the bug report. Do not paste live secrets into any web origin - including this one - if you can avoid it. Use a dummy.

7. Comparing after an edit

Copy the before document, edit here, then paste both sides into JSON compare. Path $.n should be the only change if you only touched that field.

8. Extracting then editing

Use JSONPath query to pull $.items[*], paste the match array here, and edit a row in table mode. Query selects; this page mutates.

9. Cleaning a console.log of a JS object

Browser consoles print unquoted keys and single quotes. That is not JSON. Repair first, then edit here. Do not expect this page to accept JSON5.

10. Small config files, not 50 MB dumps

Tens of thousands of nodes stay comfortable. Multi-megabyte logs freeze the tab if you expand every node. Those files belong on the file processor, not in this textarea.

JSON Editor vs Viewer vs Formatter vs Validator

These pages share an origin and a data format. They do not share a job. Use the table when you are about to open the wrong tab.

ToolWhat it doesBest for
JSON editor (this page)Change values in text, tree, or table; re-serialize one documentFixing a fixture, flipping a boolean, editing an array of rows
JSON viewerRead-oriented collapsible tree, search, optional auto-fixExploring an unknown payload without intending to mutate it
JSON formatter / beautifierPretty-print or minify valid JSON with a chosen indentReadable source or a compact payload - not tree edits
JSON validatorSyntax-only RFC 8259 check with line and columnPass/fail before you bother opening an editor
JSON repairHeuristic conversion of near-JSON into RFC 8259Unquoted keys, trailing commas, single quotes
JSON Schema validatorContract check of an instance against a schemaTypes, required keys, formats - not pretty-print

jq can map and reduce. This editor cannot. GraphQL asks a server for a shaped response; this page only edits JSON you already have. SQL joins tables; table mode never joins two documents. If you need a graph layout, use JSON to graph. If you need minify-only, use the JSON minifier.

Understanding Text, Tree, and Table Modes

JSON types in this tree are the RFC 8259 set: object, array, string, number, boolean, and null. There is no Date, no undefined, no NaN, and no comment node. Strings are quoted. Numbers are IEEE-754 doubles in JavaScript - a 64-bit integer used as an id can round if you edit it here. Keep large ids as strings.

Text mode is the source of truth you paste and copy. It is not a full IDE: no multi-cursor, no schema-aware autocomplete, no format-on-save besides the two-space re-serialize after a tree or table edit. If you only wanted indentation, the JSON formatter is the specialized page.

Tree mode is for nested maps. Expand a node, edit a primitive, and the document rewrites. Renaming keys in bulk, reordering object keys as a first-class action, and jq-style filters are out of scope. Duplicate keys in the source collapse after parse; the later key wins. That is the language, not a bug in the tree widget.

Table mode is a grid, not a database. Spreadsheet mental models assume rows. JSON does not. An object is a map; an array is a list. A table that pretends tsconfig.json is a CSV will hide structure or invent columns. This page only draws a grid when every element of an array is a non-array object. Nested objects inside a cell stringify so you can still edit them as JSON text. The reverse of a successful table is often CSV - that conversion is JSON to CSV. The other direction is already on CSV to JSON.

Common JSON Editor Errors and Honest Limits

  • Trailing comma or comment. RFC 8259 forbids both. You get line and column. Repair or strip comments; do not expect Auto Fix here.
  • Single quotes / unquoted keys. Legal in JavaScript and JSON5, illegal here. Use the JSON5 validator or JSON repair, then paste strict JSON.
  • Table fallback on Ada. Not a crash. Wrap the object in an array when you want columns.
  • Mixed arrays. [1, {"a":2}] will not become a grid. Use tree mode.
  • Large integers. Editing a snowflake id in the tree can round it. Keep it a string.
  • Huge documents. Expanding a million-node tree stalls the tab. Use the JSON file processor for 20–50 MB files in a worker.
  • Not a database, not NDJSON, not jq. One JSON value in, one JSON value out. Concatenated objects are a repair problem, not an editor feature.

Privacy & Security - 100% Browser-Side Editing

Parsing, tree rendering, and table edits run in your browser with JavaScript. After the page loads, the editor still works if the network drops. The document is stored only in this browser's localStorage under json-editor-data for up to 30 days. It is never sent to DevOkk servers. Click Clear to restore the Ada sample. Clearing site data for this origin deletes the saved draft as well.

Pasting secrets into any web origin is still a habit to avoid. This page does not upload the document, but extensions, screenshots, and shared machines still see the textarea. Use sample data. If a payload contains production tokens, rotate them rather than treating a browser tool as a vault. Typical sensitive pastes to avoid:

  • REST responses with personal data (PII)
  • JWT access tokens and OAuth payloads
  • Production database exports
  • Config files with API keys or connection strings
  • Healthcare or financial records subject to compliance rules

Frequently Asked Questions

What is an online JSON editor?

A JSON editor lets you inspect and change a JavaScript Object Notation document without installing a desktop IDE. This page keeps the same document in three views: text (the raw RFC 8259 source), tree (nested keys you can expand and edit), and table (rows and columns when the value is an array of objects). Edits in tree or table write back to the same in-memory document and re-serialize with two-space indentation.

When does table mode work?

Table mode is for a JSON array whose items are objects, such as [{"name":"Ada","ok":true,"n":1}]. Nested objects inside a cell are shown as a JSON string. A single object like the default {"name":"Ada","ok":true,"n":1}, a primitive array, or mixed types get a fallback message instead of a broken grid. Use text or tree mode for those shapes.

Does this JSON editor upload my data?

No. Parsing, tree rendering, and table edits run in your browser with JavaScript. After the page loads, the editor still works if the network drops. The document is stored only in this browser's localStorage for up to 30 days, not on DevOkk servers.

Is this the same as the JSON formatter or JSON viewer?

No. The JSON formatter pretty-prints and minifies. The JSON viewer is a read-oriented tree with search. This editor is the place to change values, rename keys in the tree, and switch among text, tree, and table. Use the JSON validator when you only need a line/column syntax report, and JSON repair when the source is not even parseable.

Can I edit JSON5, comments, or trailing commas here?

Not as JSON5. This tool parses RFC 8259 JSON. Comments, unquoted keys, and trailing commas fail in text mode. Validate that dialect on the JSON5 validator, or repair a broken draft on JSON repair, then paste the strict JSON back here.

How large a document can the browser editor hold?

It depends on device memory. Tens of thousands of nodes stay comfortable; multi-megabyte files can freeze the tab if you expand every node. For files around 20–50 MB, use the JSON file processor, which parses in a Web Worker and will not dump the payload into localStorage.

Why does the default Ada object fail in table mode?

Table mode needs an array of objects. The default {"name":"Ada","ok":true,"n":1} is a single object, so the grid is withheld on purpose. Wrap it as [{"name":"Ada","ok":true,"n":1}] and three columns appear. That fallback is the lesson, not a missing feature.

Do tree and table edits change the same document?

Yes. There is one in-memory JSON value. Editing n in the tree rewrites the textarea. Editing a table cell does the same. Copy always reads that shared document, pretty-printed with two-space indent.

Is this JSON editor free?

Yes. There is no registration, no usage cap, and no premium tree pack. Edit as much JSON as your browser can hold in memory.

Does the JSON editor work offline?

Yes, after the page has loaded. Parsing does not call a server. A dropped network does not clear the tree. The draft still lives only in this browser until you clear it or clear site data.

Related JSON Tools

Editing is one step. These sibling tools on DevOkk.com cover format, view, query, diff, repair, and validation:

  • JSON viewer - collapsible tree, search, and auto-fix when you want to explore rather than mutate.
  • JSON formatter - pretty-print or minify with a chosen indent.
  • JSON validator - syntax-only RFC 8259 check with line and column.
  • JSON repair - turn unquoted keys and trailing commas into strict JSON.
  • JSONPath query - select nodes such as $.items[*].id without editing the source.
  • JSON compare - deep-diff two documents by path after you edit one side.
  • JSON Schema validator - check an instance against a contract.
  • JSON file processor - stats, pretty, and minify for large files in a worker.
  • JSON to CSV - flatten an array of objects after you finish table-mode edits.
  • CSV to JSON - the reverse conversion when your source is a spreadsheet.