JSON Editor Online is a web-based tool to view, edit, and format JSON. It shows your data side by side in a clear, editable treeview and in a code editor.
Supported browsers: Chrome, Firefox, Safari, Opera, Internet Explorer 8+.
The applications main menu contains options to clear, load and save the JSON contents of the application. Files can be loaded from disk (via menu or drag and drop), url, or online, and can be saved online or to disk. Please note that due to security restrictions, the application can only open urls from public websites, not from an intranet. The data policy is described here.
Documents can be saved online by clicking menu Save, save online. Online saved documents can be loaded (and shared with others) via their url. This url looks like:
To open a saved document, go to menu Open. This menu contains a list with all saved documents. Documents can be deleted here too by clicking the cross right of the document name. Note that the list with documents is stored in the browsers local storage. When reinstalling your browser or clearing all browser data, this list will be gone.
Online saved documents have a name, which is displayed in the top left of the application. The name can be changed by clicking it, this will open a dialog where a new name can be entered.
Fia menu Open, Open url, one can open an arbitrary url into JSON Editor Online. Note that it's not possible to save changes to this url, and that the JSON document must be publicly available (CORS must be enabled for http://jsoneditoronline.org, and no credentials or tokens must be required).
In the settings, one can specify an indentation and JSON schema validation.
Indentation in the left panel (code editor) can be configured. The indentation is 2 spaces by default. Indentation is only applied after formatting the code again (button "Format").
To validate the structure of a JSON document against a JSON schema. As schema, you can either select one of your own online stored documents, or select a public url (like /test/schema.json). When a schema is specified, JSON Editor will show validation errors when the structure of your document does not conform the schema. More information on JSON schema validation can be found on http://json-schema.org/.
The application contains two panels: a code editor on the left, and a Tree Editor on the right.
There is a splitter between the two panels, allowing to change the width of both panels according to ones needs. To copy the contents from one panel to an other, the two copy buttons between the panels can be used.
The code editor displays JSON data in a code editor. The editor is capable of formatting, compacting, and inspecting JSON.
The menu of the code editor contains the following buttons:
The Tree editor displays the JSON data in an editable tree. The editor makes it easy to create, duplicate, remove fields, and to edit the contents of the fields.
The menu of the tree editor contains the following functions:
The field values in the editor are editable input fields. The fields can be dragged up and down using the dragarea on the left side of the fields. When a field is the last item of the childs of an array or object, the field can also be dragged horizontally to move it in or out of the array or object.
Right from the dragarea is a button to open the actions menu. Depending on the type of field, the following functionality is available in the actions menu:
To automatically load a JSON document when opening the JSON Editor,
the query parameters
json can be used:
To load an online stored document via it's id, add a query parameter named
id to the url, having the documents id as value:
To load a JSON document from a query parameter, add a query parameter named
json with the JSON document as value:
Note that the document must be url-encoded. Furthermore, the total length of an url is limited (a safe maximum is 2048 characters), so it's not possible to store large documents in a query parameter.
To load a JSON document from an url, add a query parameter named
url with the url of the document to be loaded as value:
Note that the JSON document must be publicly available (CORS must be enabled for http://jsoneditoronline.org, and no credentials or tokens must be required).
The tree editor supports shortcut keys for all available actions. The editor can be used by just a keyboard. The following short cut keys are available:
|Ctrl+S||Save the current document online.|
|Ctrl+>||Copy code from the left panel to the right panel, and move the focus to the right panel.|
|Ctrl+<||Copy code from the the right panel to left panel, and move the focus to the left panel.|
|Alt+Arrows||Move the caret up/down/left/right between fields|
|Shift+Arrow Up/Down||Select multiple fields|
|Shift+Alt+Arrows||Move field up/down/left/right|
|Ctrl+Enter||Open link when on a field containing an url|
|Ctrl+Ins||Insert a new field with type auto|
|Ctrl+Shift+Ins||Append a new field with type auto|
|Ctrl+E||Expand or collapse field|
|Alt+End||Move the caret to the last field|
|F3, Ctrl+G||Find next|
|Shift+F3, Ctrl+Shift+G||Find previous|
|Alt+Home||Move the caret to the first field|
|Ctrl+M||Show actions menu|
|Ctrl+Z||Undo last action|
The code editor is powered by Ace Editor. This editor's shortcut keys are described here:
Additionally, there are shortcut keys to format/compact the code:
|Ctrl+\||Format JSON data, set proper indentation|
|Ctrl+Shift+\||Compact JSON data, remove all whitespace|