ubin.sh

YAML Formatter & Diff

Prettify and diff YAML online, or convert it to JSON — entirely in your browser.

Output

About this tool

Format mode normalizes YAML (consistent indentation, resolved anchors) or converts it to highlighted JSON — useful for reading Kubernetes manifests, GitHub Actions workflows, and docker-compose files, or for feeding YAML config into JSON-only tools.

Diff mode compares two YAML documents structurally after parsing, so indentation style, key order, and comments don't produce false positives. Changes are listed with their exact paths.

Frequently asked questions

Why did my country code 'NO' turn into false?+

The infamous Norway problem: YAML 1.1 interprets no/yes/on/off as booleans. Quote ambiguous scalars ('NO') to keep them strings. The same applies to version numbers like 1.0 becoming floats.

Are comments preserved when formatting?+

No — the document is parsed into data and re-serialized, which drops comments. Anchors and aliases (&a / *a) are resolved into their actual values too.

Can I diff multi-document YAML (--- separated)?+

Not currently — each input must be a single document. Split multi-document files and compare the documents one at a time.

Why does the diff ignore key order?+

YAML mappings are unordered by spec, and most consumers (Kubernetes included) treat them that way. The structural diff compares values at each path, which avoids noisy false differences after refactoring.

Related tools