Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
J

jsoneditor

> 编程语言
Open source

A web-based tool to view, edit, format, and validate JSON

12.3K stars0 likes0 views
WebsiteGitHub

About

A web-based tool to view, edit, format, and validate JSON

JSON Editor

JSON Editor is a web-based tool to view, edit, format, and validate JSON. It has various modes such as a tree editor, a code editor, and a plain text editor. The editor can be used as a component in your own web application. It can be loaded as CommonJS module, AMD module, or as a regular javascript file.

The library was originally developed as core component of the popular web application https://jsoneditoronline.org and has been open sourced since then.

Supported browsers: Chrome, Firefox, Safari, Edge.

 

Continuous integration tests are run on GitHub Actions, and LambdaTest is used to test on all major browsers. Thanks, GitHub Actions and LambdaTest for the generous support for this open source project!

Successor: svelte-jsoneditor

This library jsoneditor has a successor: svelte-jsoneditor. The new editor is not a one-to-one replacement, so there may be reasons to stick with jsoneditor. The main differences between the two are described here.

Features

JSONEditor has various modes, with the following features.

Tree mode

  • Change, add, move, remove, and duplicate fields and values.
  • Sort arrays and objects.
  • Transform JSON using JMESPath queries.
  • Colorized code.
  • Color picker.
  • Search & highlight text in the tree view.
  • Undo and redo all actions.
  • JSON schema validation (powered by ajv).

Code mode

  • Colorized code (powered by Ace).
  • Inspect JSON (powered by Ace).
  • Format and compact JSON.
  • Repair JSON.
  • JSON schema validation (powered by ajv).

Text mode

  • Format and compact JSON.
  • Repair JSON.
  • JSON schema validation (powered by ajv).

Preview mode

  • Handle large JSON documents up to 500 MiB.
  • Transform JSON using JMESPath queries.
  • Format and compact JSON.
  • Repair JSON.
  • JSON schema validation (powered by ajv).

Documentation

  • Documentation:
    • API
    • Usage
    • Shortcut keys
  • Examples
  • Source
  • History

Install

with npm (recommended):

bash
npm install jsoneditor

Alternatively, you can use another JavaScript package manager like https://yarnpkg.com/, or a CDN such as https://cdnjs.com/ or https://www.jsdelivr.com/.

Use

Note that in the following example, you'll have to change the urls jsoneditor/dist/jsoneditor.min.js and jsoneditor/dist/jsoneditor.min.css to match the place where you've downloaded the library, or fill in the URL of the CDN you're using.

…

Build

The code of the JSON Editor is located in the folder ./src. To build jsoneditor:

  • Install dependencies:

    bash
    npm install
  • Build JSON Editor:

    bash
    npm run build

    This will generate the files ./jsoneditor.js, ./jsoneditor.css, and
    minified versions in the dist of the project.

  • To automatically build when a source file has changed:

    bash
    npm start

    This will update ./jsoneditor.js and ./jsoneditor.css in the dist folder on every change, but it will NOT update the minified versions as that's an expensive operation.

Test

Run unit tests:

bash
npm test

Run code linting (JavaScript Standard Style):

bash
npm run lint

License

jsoneditor is released as open source under the permissive the Apache 2.0 license.

If you are using jsoneditor commercially, there is a social (but no legal) expectation that you help fund its maintenance. Start here.

Issues· 246 open

View all issuesOpen on GitHub
  • #1579

    Autocompletion based on dynamic schema doesn't work

    bughelp wantedUpdated Sep 13, 2026
  • #1628

    Change the shortcut keys in tooltip titles to show `cmd` on Mac instead of `ctrl`

    bughelp wantedUpdated Sep 13, 2026
  • #1576

    Unintentional color picker is appearing if one of the property value is "field"

    bugUpdated Sep 13, 2026
  • #1498

    "Cannot read properties of null (reading 'getInternalPath')"

    bughelp wantedUpdated Sep 13, 2026
  • #1553

    Implement an option to enable/disable date tags

    featurehelp wantedUpdated Sep 13, 2026
  • #1653

    enum dropdown in anyOf \ oneOf

    featurehelp wantedUpdated Sep 13, 2026
  • #1575

    In code mode, text with $$ cannot be replaced.

    bugUpdated Sep 13, 2026
  • #1573

    Label 'Preview' is not associated with its edit field present under 'Transform' dialog box.

    featurehelp wantedUpdated Aug 3, 2026
  • #1295

    Feature Request: completely support dark theme

    featureUpdated May 29, 2026
  • #1673

    Display the dropdown text only not the value

    Updated Aug 21, 2025

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 28, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言