Compare YAML (YAML diff)
Put two YAML files side by side, such as two versions of a Kubernetes manifest, a CI pipeline or an app config, and see what changed, line by line and word by word.
Same layout on both sides
YAML can say the same thing in block style or in flow style ({a: 1}), with different indentation. Format both sides to lay them out the same way, so only real changes remain.
Key order
Turn on Sort keys before formatting to order every mapping alphabetically, so keys that merely moved don't show up as changes.
Errors pointed out first
Each side is checked as you type, so a mistake such as a tab used for indentation is pointed out with its line before you compare.
Comments and documents kept
Formatting keeps comments and every document of a file that has several (separated by ---), so a changed comment shows up too, and two files of manifests line up document by document.
Kubernetes manifests
Comparing what you wrote with what the cluster returns (kubectl get … -o yaml)? The cluster adds fields such as status, metadata.uid, resourceVersion and managedFields, which show as added lines. Delete them from that side first to see only the changes to your own fields.
Find each diff
Changed lines and words are highlighted with every line shown, the diffs are counted, and the arrows jump from one diff to the next; the count opens a list of just the diffs. Both sides stay editable as the highlights follow, and Swap exchanges them.
Private: nothing is uploaded
Formatting, checking and comparing all happen in your browser. Your documents are saved in the browser's own storage on this computer, not on a server, so they never leave your device.
With your permission, we count anonymous visits (which pages and tools are used), never what you type. See Privacy.
Questions
Can I compare YAML with JSON?
Convert one side first: with the JSON in an editor, choose Convert → YAML, then Use as text, and compare the two YAML files.
How do I compare two YAML files?
Paste or open one on each side, or drop each file on its side, then Format both, with Sort keys on if the key order may differ.
Why do two files that mean the same show differences?
Usually layout: indentation, flow or block style, or key order. Format both sides with Sort keys on and those differences disappear.
Is my data uploaded anywhere?
Your documents aren't: everything runs in your browser, and they are saved on your computer, in the browser's storage for this site. With your permission we count anonymous visits, never their content.
More tools
- Formatter & Converter for JSON, YAML, XML, SQL
- JSON Diff – Compare Two JSON Files Online
- YAML Formatter, Validator & Minifier
- TOML Compare – Compare Two TOML Files Online
- CSV Compare – Compare Two CSV Files Online
- XML Diff – Compare Two XML Files Online
- SQL Query Diff – Compare Two SQL Queries
- Protobuf Text Diff – Compare textproto Messages
- JSON to YAML Converter
- Free Online Diagram Maker & Editor
- Crypto Tools: Passwords, Keys, Hashes & JWTs
- Timestamp, Cron, Regex & UUID Utilities