Skip to content

JSON ↔ YAML Converter

JSON ↔ YAML Converter converts YAML to JSON and JSON to YAML locally with side-by-side sync, syntax-only validation, key sorting, indent controls, multi-document YAML, and copy/download.

JSON indent

YAML indent

Sort keys

Split array into multi-doc YAML (--- separated)

JSON

Characters

0 / 500,000

YAML

Characters

0 / 500,000

JSON ↔ YAML Converter

Quick Start

1
Paste or type JSON in the left editor, and YAML on the right updates automatically.
2
You can also type YAML on the right, and JSON on the left updates automatically.
3
Synchronization is fully bidirectional. No mode switch is needed: edit either side, and the other side is regenerated automatically.
4
Use the top toolbar to set JSON/YAML indentation, enable key sorting, and toggle multi-document YAML output.
5
Press Tab in the editor to insert indentation instead of moving focus.
6
Each editor has Copy and Clear buttons in the top-right corner. Clearing either side clears both sides.

Common Scenarios

Kubernetes authoring

convert K8s resource manifests between YAML and JSON to inspect structure from either view.

Helm values debugging

convert values.yaml to JSON to inspect types and nesting in your IDE.

CI/CD pipelines

quickly convert snippets between GitHub Actions (YAML) and CI systems that use JSON.

API debugging

convert JSON payloads to YAML for a clearer hierarchical view.

Configuration migration

convert one pasted config snippet at a time while checking how comments, anchors, and document separators change in JSON.

Syntax formatting and validation

verify JSON/YAML syntax via two-way sync, with line/column error location.

Usage Advice

A 2-space JSON indent works for most cases; use 4 spaces for deep nesting or Helm values files.
Enable Sort keys to output properties in alphabetical order, which helps compare config differences.
When the JSON root is an array, enable Multi-document YAML to split each element into a separate document (---), useful for multi-resource K8s files.
If input is invalid, the edited side highlights the error line; hover or tap to view line/column details, and the generated side is cleared instead of showing stale output.
For large content, paste first and wait for sync, then continue editing to avoid excessive re-conversion.

Conversion Contract

The last edited editor is the source. The other editor is regenerated from it when the input is valid.
Multiple YAML documents become a JSON array. A single YAML document becomes one JSON value.
When multi-document YAML is enabled, a JSON root array is written as --- separated YAML documents; an empty array stays as [] for reversibility.
Sort keys reorders object keys recursively before output, which helps comparison but changes hand-maintained key order.
Validation is syntax-only. This tool does not validate Kubernetes resources, Helm charts, OpenAPI files, JSON Schema, or policy rules.
JSON and YAML text are session drafts; indent, sorting, multi-document, line-number, and wrapping settings stay as device preferences.
Visitor/user/subscriber limits are 500,000/2,000,000/5,000,000 input chars, 25/100/250 YAML docs, 5,000/20,000/50,000 YAML nodes, 40/80/120 depth, 50,000/200,000/500,000 JSON nodes, 25,000/100,000/250,000 JSON properties, and 16/48/96 MiB output.

Lossy Round Trip Boundaries

YAML comments are dropped because JSON has no comment field.
YAML anchors, aliases, and merge keys are expanded into concrete JSON values; the reference structure cannot be rebuilt automatically.
Quote style, block scalar style, document markers, and custom YAML tags may be regenerated or lost because JSON only stores data values.
Large integers still follow JavaScript number precision. Quote Snowflake IDs, 64-bit timestamps, and other exact identifiers before converting.
File upload, URL fetch, batch file conversion, share links, sample libraries, Helm rendering, Kustomize, yq/jq expressions, schema validation, and multi-format conversion are outside this page.

Limitations & Compatibility

YAML parsing follows the YAML 1.2 spec. Older YAML 1.1 behavior, such as yes/no/on/off auto-boolean conversion, may differ.
JSON numbers follow JavaScript IEEE 754 limits. Integers beyond 53-bit safe precision may lose accuracy.
YAML anchors and aliases (&, *, <<) are expanded to concrete values when converted to JSON; references cannot be preserved and alias expansion has a safety cap.
YAML comments, quote style, and block scalar style may be dropped or regenerated because JSON does not support those presentation details.

Privacy & Security

All processing happens locally in your browser. JSON/YAML text is a session draft; indentation, sorting, multi-document, line-number, and wrapping preferences stay on this device without cloud sync, URL fetching, or remote history.

FAQ

5

Continue with these related tools for the next step.

All tool processing happens locally in your browser.