CalcCafe

YAML Viewer

Paste YAML and instantly browse its structure as an interactive, collapsible tree.

Example

Input YAML:

name: toolstack
tags:
 - cli
 - yaml
config:
 retries: 3
 cache: true

Rendered as a collapsible tree:

{ 3 keys }
 name: "toolstack"
 tags: [ 2 items ]
  0: "cli"
  1: "yaml"
 config: { 2 keys }
  retries: 3
  cache: true

How it works

Your YAML is parsed with js-yaml entirely in the browser, then rendered as nested <details> nodes you can expand or collapse. Keys and scalar values are colour-coded by type.

Good to know

YAML Viewer turns a wall of indentation-sensitive YAML into a navigable tree of expandable maps and lists, so you can see the actual shape of your data instead of counting spaces by eye. It is aimed at developers and DevOps engineers who spend their day in Kubernetes manifests, CI pipeline definitions, Docker Compose files, Ansible playbooks, and application config, and who just need to confirm "what is nested under what" without loading anything into an IDE.

Reach for it when a deeply nested file is hard to scan, when you want to confirm a value sits at the right level, or when you are handed YAML from somewhere unfamiliar and want to understand its structure before editing. Paste the text and the tree updates as you type; the status line tells you whether it parsed and how many documents it found. If parsing fails, you get the first line of the error message, which usually points straight at the offending indentation or character.

Reading the output is straightforward once you know the cues. A node labelled { 3 keys } is a map, [ 2 items ] is a list whose children are numbered by index (0, 1, 2...), and scalar values are colour-coded by type so strings, numbers, booleans, and null are easy to tell apart. Click any summary row to fold or unfold that branch, or use Expand all and Collapse all to flatten or overview the whole document at once.

A few practical notes: this viewer interprets your YAML the way a real parser does, so it reflects how a program would actually load the file, not just how it looks. Strings are shown quoted, which makes it obvious when a value like yes or 3.0 was read as a string rather than a boolean or number. Multi-document streams separated by --- are split into numbered document nodes, and everything runs locally in your browser, so even private config and secrets never leave your machine.

Frequently asked questions

Does the YAML I paste get uploaded anywhere?
No. Parsing and tree rendering happen entirely in your browser using the js-yaml library. Nothing is sent to any server.
Can it handle multi-document YAML files?
Yes. Streams with multiple documents separated by '---' are parsed and shown under separate 'document' nodes in the tree.
Is my data uploaded anywhere?
No — this tool runs entirely in your browser. Your input never leaves your device and it works offline once loaded.
Is it free?
Yes, completely free with no sign-up and no limits.

People also ask

What is the difference between a YAML viewer and a YAML validator?
A viewer parses valid YAML and shows its structure as a browsable tree so you can read and navigate the data. A validator focuses on checking whether the syntax is correct and reporting errors. This viewer does report parse errors, but its main job is visualizing structure rather than detailed validation.
Why does my YAML value show up as a string with quotes when I expected a number?
The viewer displays strings in quotes to make types unambiguous. If something like 3.0 or a date appears quoted, it means the parser read it as text, often because of surrounding quotes or formatting in your YAML. Removing the quotes in your source usually lets it parse as a number or boolean.
Can I view Kubernetes or Docker Compose YAML with this tool?
Yes. Any valid YAML works, including Kubernetes manifests, Docker Compose files, and CI configuration. Multi-resource files separated by --- are shown as separate numbered document nodes in the tree.
What does the index number like 0 or 1 mean in the tree?
Those are list positions. When a node is a list (shown as [ N items ]), each child is labelled with its zero-based index, so 0 is the first element, 1 the second, and so on.
Does YAML support comments, and will they appear in the tree?
YAML supports comments using the # symbol, but comments are not data. They are ignored during parsing, so they will not appear as nodes in the rendered tree.
Why am I getting an 'Invalid YAML' message?
It usually means the parser hit a syntax problem such as inconsistent indentation, a tab character where spaces are required, a missing colon, or an unclosed quote. The error line shown points toward the cause so you can locate and fix it.
Can it handle very large YAML files?
It can, since processing happens locally in your browser, but extremely large files may render slowly because every node becomes an element in the page. Collapsing branches you are not inspecting keeps navigation responsive.

Related tools