svelte-jsoneditor is a Svelte-based component and vanilla JavaScript bundle for viewing and editing JSON in web apps. It also ships as vanilla-jsoneditor for React, Vue, Angular, and plain JS integrations.
Overview
svelte-jsoneditor provides interactive JSON editing for browser applications, with a low-level text mode and higher-level tree and table views. It targets developers who need in-app JSON inspection and mutation rather than a standalone desktop program, and it expects a reasonably modern browser environment.
Core capabilities include formatting and compacting documents, sorting and filtering, query and transform helpers, JSON repair, schema validation through Ajv, custom validators, syntax highlighting, undo and redo, search and replace, and utilities such as color pickers and timestamp tags. Large documents are supported up to hundreds of megabytes in tree and table modes, with safeguards in text mode when sizes might stress the browser.
Installation paths cover Svelte 5 projects on the current major line, with a prior major for older Svelte versions, and a separate vanilla-jsoneditor package exposing a class-based API for other frameworks via thin wrappers. Standalone ES bundles exist for direct browser use, though bundler-based installs are preferred so shared dependencies are not duplicated.
Configuration spans read-only mode, navigation and status bars, indentation and truncation limits, custom parsers such as lossless-json, async remote schema loading, custom menu and context menu items, and specialized renderers for values including JSON Schema enums. The project is the open-source editor component associated with the broader JSON Editor Online ecosystem described by its author.
Key features
- Tree, table, and text modes
- JSON Schema validation
- Format, repair, and transform
- Search and replace
- Vanilla and Svelte packages
- Custom parsers and validators
- Large document handling
- Framework wrapper support
Use cases
- Admin JSON config screens
- API payload debug UIs
- In-browser schema editing
- Data import preview tools
- Embedded debug panels