🌐 EN

🔄 YAML ↔ JSON / CSV Converter

Convert YAML and JSON bidirectionally. Useful for turning config files (docker-compose, GitHub Actions, k8s manifests) into JSON to inspect programmatically, or turning JSON into human-readable YAML. The JSON↔CSV tab converts flat array data into spreadsheet-ready CSV.

GUIDE

Learn more

01

1. When to use YAML vs. JSON

JSON is optimized for machine-to-machine data exchange (API responses, saved config) — its strict grammar means fewer parsing surprises. YAML is indentation-based, supports comments (#), and reads well for humans, which is why it dominates config files: docker-compose.yml, GitHub Actions workflows, Kubernetes manifests, Ansible playbooks. Use this tool to turn a YAML config into JSON for programmatic handling, or turn JSON data into tidy, human-readable YAML.

02

2. Conversion caveats

YAML can express more than JSON: anchors (&), aliases (*), multi-document separators (---), and block scalars (| and >). Converting a document that uses these to JSON expands anchors/aliases to their literal values, and only the first of multiple documents is converted. JSON→YAML is always safe, since JSON is close to a subset of YAML. Watch out for number-looking strings (e.g. a zip code "01234") — without quotes, YAML may interpret them as numbers.

03

3. JSON ↔ CSV and nested structures

CSV can only represent a table (rows and columns), so it can't hold JSON's nested objects/arrays directly. This tool automatically flattens nested objects into dot-notation columns like "user.name", "user.age", and CSV→JSON rebuilds the original nested structure from those dot-notation headers. Array values (e.g. a tag list) are stored as a raw JSON string inside the cell — safer to round-trip through the tool than to hand-edit in a spreadsheet.

Frequently asked questions

What YAML syntax is supported?
We use the js-yaml library, which supports standard YAML 1.2 syntax (maps, sequences, scalars, comments, anchors/aliases, block scalars, multiple data types) — covering most real-world config file syntax.
What happens to nested objects in JSON→CSV?
They're automatically flattened into "parent.child" dot-notation columns. For example, {"user":{"name":"Kim"}} becomes a "user.name" column containing "Kim".
Can I convert JSON containing arrays to CSV?
The top level must be an array of objects (e.g. [{"a":1}]). Array values inside each object (e.g. a tag list) are stored as a raw JSON string inside the cell.
Is my data sent to a server?
No. All conversion happens entirely in your browser (JavaScript); nothing you enter is sent to a server.