YAML Anchors & Aliases Resolver
Resolve YAML anchors and aliases into fully expanded output.
What is Anchors?
A teaching and conversion tool for YAML anchors (&name) and aliases (*name): it shows what each anchor expands to and emits the fully resolved document.
How it works
js-yaml resolves aliases natively during parsing; the tool also scans the source for anchor definitions and alias references and lists them with line numbers.
- Enter your input. Type or paste your input into the field above — the tool responds instantly.
- Review the result. Output updates live as you type. Everything runs entirely in your browser.
- Copy or download. Use the Copy button to grab the result, or Download to save it as a file.
Examples
Expanding shared blocks
Resolve anchors and aliases in a config so every repeated block appears in full — handy before feeding the YAML to a tool that doesn't support anchors.
Common mistakes
Merge keys semantics
The << merge key combines maps but arrays aren't merged. The resolver applies the standard behavior and shows the result.
Frequently asked questions
Can it detect undefined anchors?
Yes — aliases pointing at missing anchors are reported as errors.
Does it preserve the original file?
The input is untouched; the expanded document is a separate output you copy or download.