JSON ↔ YAML Converter

Switch between JSON and YAML for configs, CI files, and API samples. Pick a direction, paste or upload, then copy or download. Uses js-yaml (MIT) bundled on this page—nothing is sent to a server. For JSON-only formatting, use the JSON formatter.

Clear

Or upload a JSON file

Max 10 MB UTF-8 · processed locally

Output

Runs only in your browser. Includes bundled js-yaml (MIT).

How to convert JSON and YAML online

Choose a direction, validate input with Convert, then copy or download the other format.

Pick JSON → YAML or YAML → JSON

Tabs switch labels, placeholders, and which file types the uploader suggests.

Paste or upload

Stay under the size limit. JSON must be valid; YAML must parse as a single document.

Convert and export

Adjust indent for output, then copy or download .yaml or .json.

Why Use a JSON ↔ YAML Converter?

Teams mix JSON (APIs, package files) and YAML (Kubernetes, GitHub Actions, Ansible). A quick converter avoids context-switching to the command line.

Config and CI pipelines

Turn JSON samples into readable YAML snippets—or flatten YAML to JSON for tools that only accept JSON.

No CLI required

Paste from Slack, docs, or logs and get the other format without installing yq or jq.

Explicit errors

Invalid JSON or YAML surfaces the parser message so you can fix commas, quotes, or indentation.

Controlled output shape

Choose 2- or 4-space indentation for both YAML dumps and pretty-printed JSON.

Private and Secure

Conversion runs entirely in your browser. Text and files are not uploaded, logged, or stored on any server.

Local processing

js-yaml executes in your tab only; your data never leaves the device.

No account or API

No keys, quotas, or backend—just static pages and scripts.

Size limits on purpose

Large pastes are rejected to reduce memory pressure and keep the tab responsive.

Frequently asked questions

About 10 MB of UTF-8 text per paste or file, similar to other JSON tools on this site. Bigger documents may still exhaust memory on low-end devices.
No. The converter expects a single YAML document (one stream). Split multi-document files or use only the first document.
JSON only has data types JSON supports. YAML dates, binary, and other tags are converted to the nearest JSON representation; going back to YAML may look different but stay data-equivalent where possible.
No. Parsing and dumping run in your browser; the bundled js-yaml library is loaded with the page, not from a remote API call for your content.
The formatter prettifies or minifies JSON only. Here you change the serialization format between JSON and YAML.