Online JSON Editor
Edit JSON as text or as an interactive tree. Change values, rename keys, insert and reorder items without hunting for commas and brackets, then sort, filter, undo and redo as you go. When you are done, download the file, save it in your browser or share a link.
How to edit JSON online
- Paste JSON into the left editor, open a file with Open file (Ctrl+O), or drop one onto the page.
- Edit the text in the Code view, or use the right editor's Tree view to change values and structure with the mouse.
- Press Format (Ctrl+Enter) to send the left editor to the right, or the left arrow between the editors to bring your tree edits back to the left.
- When you are done, copy or download the JSON, save it in your browser with Ctrl+S, or share it with a link.
Code view: edit JSON as text
The Code view is a full code editor built on Ace, the editor used by many online IDEs. It gives you syntax highlighting, line numbers, bracket matching, code folding, multiple cursors, search and replace (Ctrl+F and Ctrl+H) and unlimited undo. Errors are marked as you type, with the line and reason in the status bar, so you never save broken JSON by accident.
Tree view: edit JSON without the syntax
The Tree view shows every object and array as a node you can expand and collapse. It is the easiest way to edit JSON if you do not want to think about commas and brackets:
- Edit a key or value by clicking it and typing.
- Insert, duplicate or remove items from the context menu on each node.
- Change the type of a value, for example from a string to an object or an array.
- Reorder items by dragging them.
- Search keys and values and jump between the matches.
- Expand or collapse all with one click to get an overview of a large document.
Sort, filter and transform
Each editor's ⋯ menu has Sort keys, which orders the keys of an object or the items of an array, ascending or descending, and Transform and filter, which opens a dialog where you filter, sort and pick fields, for example to keep only the orders with a status of "shipped", or to list just the email address of every user. You see a preview before anything changes, and undo takes you straight back.
Fix mistakes as you go
If the text in the Code view stops being valid JSON, the error is shown with its line and column. Repair common mistakes, in the input's ⋯ menu, fixes common problems such as single quotes, trailing commas and missing quotes around keys. For heavily broken input, such as JSON cut off half way through, try JSON Repair.
Save, reopen and share
- Save (Ctrl+S) keeps both editors in this browser with a title and an optional note. Saving again updates the same item.
- Saved lists everything you have kept, with search. Export the list to a file to back it up or move it to another computer, then import it there.
- Share creates a link anyone can open, lasting from one day to one year, or with no expiry.
- Download (Ctrl+Shift+S) saves the output as a file with the name you choose.
Make the editor comfortable
Open the settings dialog with the sliders icon or Ctrl+, to choose a coding font such as JetBrains Mono, Fira Code, Source Code Pro or Cascadia Code, change the font size, and pick a colour theme like GitHub Light, One Dark, Monokai, Dracula, Nord or Gruvbox. You can also turn line wrapping, line numbers, indent guides and font ligatures on or off, and choose whether the editor remembers your last input.
What people use the JSON editor for
- Changing a value in a config file, such as a feature flag or an API endpoint, without breaking the syntax.
- Building a request body to test an API in Postman, curl or a browser.
- Trimming a large API response down to a small sample for a bug report or a test fixture.
- Editing translation files, mock data and seed data.
- Teaching or learning JSON, with instant feedback on every mistake.
Related tools
To check what changed after editing, paste the old and new versions into JSON Compare. To move data into a spreadsheet or a config format, use JSON to CSV or JSON to YAML. To only read a document, the JSON Viewer opens straight into the tree.
Free and private
The online JSON editor is free, with no account and no limits. Your JSON stays in your browser unless you choose to create a share link.