What is YAML Viewer?
This YAML viewer turns YAML into an interactive tree. Deeply nested YAML is hard to read because the structure is expressed only through indentation; in the tree, every mapping and list becomes a node you can expand and collapse, so you can see exactly which keys belong where and spot values that ended up at the wrong level.
Paste your YAML and the tree appears below it, with key and item counts, search, expand all and collapse all, and copy buttons for any branch, the same viewer used for JSON. Lists of objects, such as the containers in a Kubernetes pod or the steps in a CI job, are shown as numbered entries.
How to use YAML Viewer
- Paste your YAML into the input box.
- Explore the tree: click nodes to expand or collapse them.
- Use Expand all and Collapse all to switch between overview and detail, or search for a key or value.
- Hover a node and click copy to copy that branch as JSON.
Key features
- Interactive, collapsible tree of YAML mappings and lists
- Key and item counts for every node
- Anchors, aliases and merge keys resolved to their values
- Multi-document files shown as a list of documents
- Expand all, collapse all, search and copy any branch
- Virtualized rendering for large files, entirely in your browser
Common use cases
- Understanding deeply nested application settings
- Checking that keys are nested at the intended level
- Exploring environment-specific configuration files
- Copying a section of configuration as JSON
Technical details & standards
The YAML is parsed with a full YAML 1.2 parser, so mappings, lists, flow collections, multi-line strings, anchors, aliases and merge keys are all resolved before the tree is built. Values are typed with the YAML 1.2 core schema: numbers, true, false and null become typed values, while yes, no and dates stay strings. A file with several documents separated by --- is shown as a list of documents.
The result is displayed with the virtualized tree viewer, so large configurations scroll smoothly. Invalid YAML shows the parser's error with its line number instead of a tree, and comments are not part of the tree because they are not part of the data.
Frequently asked questions
How do I view a YAML file as a tree?
Copy the contents of the YAML file and paste them into the viewer. Each mapping and list becomes a collapsible node in the tree below.
Are YAML lists shown in the tree?
Yes. Lists become numbered nodes, and lists of objects, such as Kubernetes containers or GitHub Actions steps, can be expanded item by item.
Can I convert YAML to JSON?
Yes. The YAML to JSON Converter produces the same data as JSON text, and each node in this viewer can be copied as JSON.
Is my configuration uploaded?
No. Parsing and rendering happen in your browser, so secrets in configuration files never leave your device.
Is my data safe?
Processing happens locally in your browser. Tool input is not sent to CodeUnpack servers.
Does it work offline?
Once the page has loaded, this tool can process input without an internet connection.