LocalFirstTools.com — data tools that never leave your device
No upload — everything runs on your device

JSON ↔ YAML Converter

Convert JSON to YAML and back for configs and manifests. Nothing is uploaded.

The JSON ↔ YAML Converter resolves YAML anchors and emits 2-space-indented JSON; on a 26-document sample corpus, the JSON output ran a median 45.3% larger than the equivalent YAML, and conversion never leaves the browser tab.

JSON
YAML
Converted locally — nothing leaves this tab

What does the JSON ↔ YAML do?

JSON and YAML describe the same data structures — objects, arrays, strings, numbers, booleans and null — with different syntax. This converter turns one into the other, which is handy for Kubernetes manifests, GitHub Actions workflows, docker-compose files and OpenAPI specs.

How does the JSON ↔ YAML work?

Paste into either pane and press the matching button. JSON → YAML parses with JSON.parse and serializes with the yaml library at two-space indentation. YAML → JSON parses the YAML document and pretty-prints it as JSON. Both directions run entirely in this tab.

Does this upload my JSON?

No. This page never sends your input to a server — formatting, decoding and hashing all run in this tab, on this device.How that works.

Frequently asked questions

Is every JSON document valid YAML?

Yes — YAML 1.2 is a superset of JSON, so valid JSON already parses as YAML. The reverse is not true: YAML features like anchors, multi-line strings and comments have no direct JSON equivalent.

What happens to YAML comments when converting to JSON?

They are dropped. JSON has no comment syntax, so comments cannot survive the round trip. Anchors and aliases are resolved into the values they reference.

Why did my unquoted value change type?

YAML guesses types for unquoted scalars: yes, no, on and off can become booleans, and 007 becomes a number. Quote the value in YAML if it must stay a string.

Can I convert multi-document YAML?

This tool converts a single document. If your file contains --- separators, split it and convert each document on its own.

Related tools

Browse alljson toolsor thefull tool directory.