Introduction
v3-jsoneditor is a Vue 3 component that wraps jsoneditor by Jos de Jong, the battle-tested web tool for viewing, editing, formatting and validating JSON. It gives you a single <Vue3Jsoneditor> component with v-model support, a modern theme, a fullscreen mode and a typed API, so you can drop a full JSON editor into any Vue 3 app in a couple of lines.
vue
<script setup>
import { ref } from 'vue'
import Vue3Jsoneditor from 'v3-jsoneditor'
const json = ref({ name: 'v3-jsoneditor', stars: 42, tags: ['vue', 'json'] })
</script>
<template>
<Vue3Jsoneditor v-model="json" height="320px" />
</template>Explore the docs
Get startedInstall the package and render your first editor in a minute.GuidesUsage, validation, theming, fullscreen and SSR in depth.API ReferenceEvery prop, event and exposed method, with types.ExamplesLive, copyable demos from basic to custom toolbars.Use with AIllms.txt, Markdown pages and prompts for your assistant.PlaygroundTry every option live and copy the generated SFC.
Features
- Two-way binding with
v-modelfor any JSON value: objects, arrays, strings, numbers, booleans andnull. - Five editing modes from jsoneditor:
tree,code,form,textandview, with a configurable mode switcher andv-model:currentMode. - JSON Schema validation through
options.schema, plus custom validation viaoptions.onValidateand avalidation-errorevent. - Themes: a modern
lighttheme (default),dark,auto(follows your site's dark mode) andclassic(the original jsoneditor look), all customizable with CSS variables. - Fullscreen mode in every editor mode, controllable with
v-model:fullscreen, closable with Esc. - Custom toolbar content through the
#toolbarslot. - Full jsoneditor access: pass any jsoneditor option through
options, or grab the raw instance withgetEditor(). - SSR-safe: jsoneditor is loaded lazily on the client, so the component can be imported in Nuxt and VitePress.
- TypeScript types with JSDoc ship with the package.
- Internationalization:
en,zh-CN,pt-BR,tr,ja,fr-FR,de,ruandes.
When to use it
v3-jsoneditor is a good fit when you need to:
- Let users edit configuration, settings or API payloads as structured JSON.
- Inspect API responses or logs in an admin panel or developer tool.
- Offer a read-only, collapsible JSON viewer.
- Validate user-supplied JSON against a JSON Schema before saving it.
If you only need to display a small, static snippet of JSON, a <pre> block with syntax highlighting is lighter. For everything interactive, read on.
Next steps
- Getting Started: install and render your first editor.
- Usage:
v-model, modes, options, methods and events. - Examples: live demos you can copy.
- Playground: try every prop interactively.