Global Araç
Yaml Json Converter
YAML girişi
JSON çıktısı
Skalerleri, iç içe eşlemeleri ve blok (-) veya akış ([ ], { }) sözdizimine sahip dizileri destekler. Sekmeler YAML'de geçerli girinti değildir.
A free two-way YAML ↔ JSON converter. Paste YAML to get JSON, or paste JSON to get clean YAML — then hit Swap to bounce in the other direction with the output promoted to the new input. Supports nested mappings, block and flow sequences, strings, numbers, booleans, and null.
YAML is the config-file default for Kubernetes, GitHub Actions, Docker Compose, Ansible, and most dev tooling. JSON is the default for APIs and JavaScript. Translating between them is an everyday task. Tip: YAML disallows tab characters in indentation — if a paste errors, check for mixed tabs and spaces.
Nasıl Kullanılır
- Pick the direction you want: YAML → JSON or JSON → YAML.
- Paste or type in the top box.
- Read the output instantly in the bottom box — errors show inline.
- Hit Swap to flip direction and continue iterating.
Ne Zaman Kullanılır
- Translating Kubernetes manifests between team conventions (some prefer JSON, others YAML).
- Converting GitHub Actions workflow YAML to JSON for programmatic generation.
- Migrating Docker Compose YAML to a JSON-based orchestration tool.
- Translating an OpenAPI spec between YAML and JSON formats.
Ne Zaman Kullanılmaz
- When you need to preserve YAML comments — convert manually or use yq.
- Documents using YAML 1.1 quirks that may not be detected — verify with explicit tests.
- Very large config files (5MB+) — browser performance suffers.
Yaygın Kullanım Senaryoları
- Convert kubectl-output JSON to YAML for committing to a Git repo as a manifest.
- Translate a docker-compose.yml to JSON for parsing in a Node.js automation script.
- Move OpenAPI 3.0 specs between YAML (human edits) and JSON (build-time consumption).
- Cross-reference a Helm chart's values.yaml against the schema's JSON representation.
Sık Sorulan Sorular
Does it preserve comments?
YAML-to-JSON loses comments (JSON doesn't support them). JSON-to-YAML has no comments to preserve. For comment-critical conversions, use a tool like yq which can preserve some metadata.
What about YAML anchors and aliases?
The converter expands anchors and aliases during YAML-to-JSON conversion — the resulting JSON has each referenced value inlined.
Which YAML spec?
YAML 1.2 — the current standard. This handles the 'Norway problem' (no as boolean) correctly, unlike older 1.1 parsers.
Max file size?
Up to about 2 MB for smooth browser performance. Larger documents may cause UI lag since parsing happens client-side.
Why use YAML over JSON?
YAML pros: human-readable for config files, supports comments, less syntactic noise (no quotes around keys, no commas at line ends), standard for Kubernetes/Docker Compose/GitHub Actions/Ansible. JSON pros: faster to parse, strict syntax (less ambiguity), universal language support, native to JavaScript. Use YAML for configuration humans will edit by hand; use JSON for API payloads, data interchange, and programmatic generation. Many systems support both: Kubernetes accepts JSON manifests, but YAML is the convention. JSON is faster to parse but YAML is more pleasant to read.
What's the difference between YAML 1.1 and 1.2?
YAML 1.1 (2005): 'yes', 'no', 'on', 'off' parse as booleans. The famous 'Norway problem': country code 'NO' parsed as false, breaking config files. YAML 1.2 (2009): only 'true' and 'false' (case-insensitive) parse as booleans; 'yes'/'no' stay as strings. Most modern parsers (PyYAML 5+, js-yaml 4+) default to 1.2 mode. If parsing legacy YAML, you may need explicit 1.1 mode or quote ambiguous values: country: 'NO' vs country: NO.