Canonical: https://toolipedia.app/yaml-toolbox

# YAML Toolbox

Merge several YAML documents into one, sort keys at every level and expand anchors and aliases into plain YAML, with the layout and list-merge behaviour under your control.

Breadcrumbs: Toolipedia > Developer tools > Code and developer utilities > YAML Toolbox

## About YAML Toolbox

Configuration work often needs a few repeated YAML chores. This toolbox merges several documents, from the text box separated by --- lines and from files, into one: mappings merge key by key, later documents win, and lists are replaced, joined or joined without repeats as you choose. It sorts keys at every level in either direction, with an option to ignore case, and it expands anchors, aliases and merge keys into plain YAML you can read without chasing references. Comments are not kept, because the data is parsed and written out again.

## How to use YAML Toolbox
1. Choose merge, sort keys or expand anchors, then paste the YAML, using a line with --- between documents.
2. For a merge add more files and pick what happens to lists; for sorting pick the key order.
3. Copy or download the resulting YAML and check the line count and size.

## Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.

## Also known as
- yaml toolbox
- merge yaml files
- sort yaml keys
- expand yaml anchors and aliases
- yaml deep merge online

## Frequently asked questions

### Are comments and formatting preserved?

No. The YAML is loaded into data and written out again, so comments, blank lines and quoting style are lost. Keep the original if you need the comments.

### How does a merge handle conflicting values?

The value from the later document wins. Two mappings under the same key are merged recursively, while lists follow your choice: replace, join, or join without duplicates.

### What does expanding anchors and aliases do?

Each alias such as *base is replaced by a full copy of the anchored value, and merge keys marked with << are resolved, giving YAML that no longer needs the references.

### Is YAML Toolbox free?

Yes. YAML Toolbox on Toolipedia is free to use, with no sign-up and no watermark.

### Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

### Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

### Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

## Related tools

More free tools that go well with YAML Toolbox:
- [JSON to YAML converter](https://toolipedia.app/json-yaml-converter)
- [JSON Deep Merge Tool](https://toolipedia.app/json-deep-merge)
- [Table of Contents from Headings](https://toolipedia.app/toc-from-headings-generator)
- [IP address converter](https://toolipedia.app/ip-address-converter)
- [.env File Sorter and Validator](https://toolipedia.app/env-file-sorter)
