JSON Editor

Edit, validate, compare, query and convert — all in one tool.

{{ __t('loading_editor') }}
{{ stats.size }} {{ __t('bytes') }} {{ stats.lines }} {{ __t('lines') }} {{ stats.keys }} {{ __t('keys') }} {{ stats.depth }} {{ __t('depth') }} {{ stats.nodes }} {{ __t('nodes') }}
{{ __t('schema_section_title') }}
{{ __t('schema_valid') }}
{{ __t('schema_errors_heading') }}:
• {{ err }}
{{ __t('compare_left') }}
{{ __t('compare_right') }}
{{ diff.added.length }} {{ __t('compare_added') }} {{ diff.removed.length }} {{ __t('compare_removed') }} {{ diff.modified.length }} {{ __t('compare_modified') }} {{ __t('compare_identical') }}
+ {{ p.path }} : {{ p.value }}
- {{ p.path }} : {{ p.value }}
~ {{ p.path }} : {{ p.from }} → {{ p.to }}
{{ __t('convert_input_label') }} ({{ convertFrom.toUpperCase() }})
{{ __t('convert_output_label') }} ({{ convertTo.toUpperCase() }})
{{ convertError }}
{{ __t('query_examples_label') }}: {{ ex }}
{{ __t('query_input_label') }} (JSON)
{{ __t('query_result_label') }}
{{ queryError }}
{{ __t('query_help_heading') }}: {{ __t('query_help_jsonpath') }} — JSONPath Docs {{ __t('query_help_jmespath') }} — JMESPath Spec

What is the CalcSI JSON Editor?

The CalcSI JSON Editor is a free online tool for editing, validating, comparing, querying and converting JSON data. Switch freely between three views — tree, text and table — and use advanced features like JSON repair, schema validation, diff comparison, JSONPath/JMESPath queries and conversion to YAML, CSV, XML or TypeScript interfaces.

All processing happens entirely in your browser — your data never leaves your device. Ideal for developers, API testers, DevOps engineers, and anyone working with JSON.

Three editor views

  • Tree view — Click to edit, drag-and-drop to reorder, keyboard shortcuts to add or remove nodes.
  • Text view — Full code editor with syntax highlighting, line numbers and inline error markers.
  • Table view — Display arrays of objects as a table, columns = keys. Perfect for API responses with records.

Feature set

  • Repair — Auto-fix trailing commas, unquoted keys, single quotes and comments.
  • Sort — Recursively order keys alphabetically for deterministic diffs and improved readability.
  • JSON Schema validation — Validate your data against a custom schema with types, required fields, min/max, patterns and more.
  • Compare (diff) — Two JSONs side-by-side with a clear list of added, removed and modified paths.
  • Query — JSONPath and JMESPath supported. Extract exactly the data you need with expressive paths.
  • Convert — Switch between JSON, YAML, CSV, XML and generate TypeScript interfaces from your data.
  • Import & export — Upload a file, load from URL, download as .json, copy to clipboard.
  • 100% local — All operations run in your browser; no data is uploaded or logged.

Common use cases

  • Inspect, filter and export API responses to other formats
  • Edit and validate configuration files (package.json, tsconfig, OpenAPI)
  • Data migration: convert JSON from one application to YAML/CSV/XML for another
  • Hunt bugs by diffing two snapshots (before / after a failure)

Is this tool secure?

Yes. All processing — parsing, validating, comparing, converting, querying — runs entirely in your browser. There is no server round-trip and no logging. You can inspect the source code at any time using your browser's developer tools. Even sensitive data like tokens or PII never leaves your device.

JSON Editing in Depth: Tree, Text, Schema and Query

Since RFC 8259 (ECMA-404), JSON is the universal exchange format for structured data on the web. Six types — string, number, boolean, null, object, array — and mandatory UTF-8 are enough to power REST APIs, configurations, logs, telemetry and even databases (BSON, JSONB in PostgreSQL). In daily work, however, you rarely start from an empty file: you receive an 800-line response, want to flip a nested key, rename a property or diff two configs — and a plain text editor is too crude. A JSON editor shows the structure as a tree, validates as you type, understands schema constraints and can extract paths via JSONPath or JMESPath.

This editor combines four modes: Edit (Tree/Text/Table) with JSON repair, format and minify; Compare for side-by-side diff with an add/remove/modify path list; Convert between JSON, YAML, CSV, XML and TypeScript interfaces; Query with JSONPath ($.users[?(@.age > 18)].name) or JMESPath (users[?age > `18`].name). Every mode runs fully in the browser — the engines vanilla-jsoneditor, js-yaml, PapaParse, fast-xml-parser, jmespath and jsonpath-plus are loaded as ESM/UMD bundles, no backend is involved.

Anyone who works with JSON eventually hits JSON Schema (Draft 2020-12). Schemas describe types, required fields, value ranges and formats (email, URI, date). The built-in mini validator covers the most common constraints: type, required, properties, items, minLength, minimum/maximum, enum and format: email. For more complex cases such as oneOf or $ref, run Ajv in your own build pipeline.

How to Use the JSON Editor Effectively

Five typical workflows cover 90% of real-world use cases:

  1. Inspect an API response: click Load example, paste your own JSON, then switch between Tree, Text and Table views. Arrows expand nested objects, the status bar shows bytes, lines, keys, nodes and depth.
  2. Repair broken JSON: click Repair. The editor removes trailing commas, adds missing quotes around keys ({name:"x"}{"name":"x"}) and replaces single quotes with double quotes — the typical mistakes when pasting from JavaScript source code.
  3. Validate a schema: open the JSON Schema section, click Schema example and adjust it. Validate shows either "valid" or a list of concrete errors such as address.zip: minLength 5 with the path.
  4. Compare two versions: in the Compare tab, load or paste a file on each side, then click Diff. You see red removed, green added and orange modified — perfect for code reviews, migrations or settings audits.
  5. Extract data: in the Query tab, paste JSON and run e.g. $.users[?(@.active)].email to fetch every active user's e-mail. The suggested examples are clickable.

Real-World Examples

These concrete scenarios occur daily in real projects:

  • API patch: with a few tree-view clicks {"user":{"name":"Anna","age":29}} turns into {"user":{"name":"Anna","age":30,"role":"admin"}} — no bracket counting required.
  • JSONPath: $.products[?(@.price < 50)].name returns every product name below 50 EUR from a catalog as a JSON array.
  • JMESPath: length(users[?active]) counts active users right in the browser — faster than firing up jq for a quick answer.
  • Generate a TypeScript interface: a JSON snippet becomes via Convert → TypeScript the code interface RootObject { name: string; age: number; roles: string[]; } — copy-paste into your .d.ts file.
  • Diff for PR review: load two versions of your config.json into Compare and the editor shows + logging.level : "debug" and ~ timeout : 30 → 60 in a path list.

Limits, Edge Cases and Security

Despite all conveniences there are pitfalls. First: number precision. JSON numbers are not type-tagged; JavaScript uses IEEE-754 doubles, which causes rounding at values beyond Number.MAX_SAFE_INTEGER (2^53 − 1). If you process large IDs (Twitter IDs, Snowflake IDs), keep them as strings — otherwise 10765432109876543 silently becomes 10765432109876544. Second: JSON repair limits. The heuristic repair fixes the most common typos but cannot reliably reconstruct mangled strings with unescaped line breaks — for severe damage, re-export from the source system. Third: URL import & CORS. The URL import feature runs a fetch() from your browser. Servers without an Access-Control-Allow-Origin header are blocked; only a proxy or local upload helps. Fourth and security-critical: JSON injection and prototype pollution. If you later merge edited JSON server-side with Object.assign(config, JSON.parse(input)), an attacker can use __proto__ or constructor keys to manipulate the global object prototype. Filter these keys server-side or use Map instead of plain objects. Fifth: privacy. Everything runs locally — but if you use URL import, the target server sees your IP. For sensitive endpoints, paste directly into the browser instead.

More Frequently Asked Questions about the JSON Editor

How do I extract a single key without manual bracket counting?
Use the Query tab. JSONPath $.user.address.zip or JMESPath user.address.zip returns the value directly. For filtered arrays: $.users[?(@.active)].email yields every active user's e-mail.
Why does my ID number change slightly after parsing?
Because JavaScript stores JSON numbers as IEEE-754 doubles. Values beyond 2^53 − 1 (9007199254740991) lose precision. Solution: send large IDs as strings, e.g. "id":"10765432109876543", or use BigInt support on the server.
What is the difference between JSONPath and JMESPath?
JSONPath (Goessner syntax) is XPath-like, starts with $ and is the de-facto standard. JMESPath is more strictly specified as a draft standard, is used in AWS tooling, and offers functions like length() or sort_by(). Both are supported in the browser — pick the one your ecosystem uses.
Can I validate JSON Schema with $ref or oneOf?
The built-in validator covers common constraints (type, required, properties, items, min/max, enum, format: email). For full Draft 2020-12 compliance — including $ref, oneOf, allOf, if/then/else — use Ajv in a Node build or in the browser with ajv-formats.
How large can the JSON I open here be?
Available browser RAM is the practical limit. Files up to about 10 MB feel comfortable in tree view; beyond that, rendering becomes sluggish because each node generates DOM elements. For very large files switch to text view or split with jq into smaller chunks first.
Are my data stored or uploaded?
No. Everything runs in JavaScript inside the browser; CalcSI sees neither content nor schema. The only exception is the optional URL import — the target server sees your IP then. For strictly confidential data, paste instead of importing.

Related Tools

  • JSON Formatter — Fast beautify, minify and validate without the tree view — ideal for short snippets.
  • YAML ↔ JSON Converter — Lossless conversion between YAML and JSON notation for configs and CI pipelines.
  • XML Editor — Edit, validate and transform XML with XSLT/XPath — the counterpart to the JSON editor for SOAP and legacy data.