YAML Viewer

Paste a YAML document and explore it as a collapsible tree instead of squinting at indentation. The viewer parses with a full YAML 1.1 engine, so anchors and aliases, multi-document streams separated by ---, block and flow scalars, and typed values all resolve the way a real loader would. Syntax errors are reported with the line and a readable message, and a toggle shows the equivalent JSON. Nothing is uploaded — the document is parsed entirely in your browser, so configs and secrets-laden manifests stay on your machine.

How to use the YAML Viewer

Paste YAML into the box or load a .yaml / .yml file. The tree renders as you type, with object keys, array indices, and scalar values colour-coded. Click any triangle to fold or unfold a branch, or use Expand all and Collapse all to open or close the whole structure at once. If a node has an anchor that is referenced elsewhere, the alias is resolved inline so you see the effective value rather than a placeholder.

Flip on Show as JSON to see the same data serialised as pretty-printed JSON, which is handy for copying into a tool that expects JSON or for confirming exactly how a value was typed. When the document does not parse, the tree is replaced by an error box naming the line and column and describing the problem, so you can jump straight to the offending indentation or stray tab. Files containing multiple documents separated by --- are each shown as a numbered root, matching how a YAML stream is loaded.

What YAML actually is, and where it bites

YAML stands for "YAML Ain't Markup Language" and is a data-serialisation format built around indentation rather than brackets. Three node kinds make up every document: scalars (strings, numbers, booleans, null), sequences (ordered lists, written as - item lines or inline as [a, b]), and mappings (key-value collections, written as key: value or inline as {a: 1}). Nesting is expressed purely by how far a line is indented, which is what makes YAML readable and also what makes it fragile.

Two features set YAML apart from JSON. Anchors and aliases let you label a node with &name and reuse it later with *name, so shared configuration is written once and referenced many times; the << merge key extends this to mappings. A single file can also hold a multi-document stream, with each document separated by a --- line and optionally terminated by ... — the pattern Kubernetes manifests use to bundle several resources together. Block scalars (| for literal newlines, > for folded) handle multi-line strings cleanly.

The convenience comes with sharp edges. Tabs are forbidden for indentation, so a single tab pasted from an editor breaks the whole file with a cryptic message. The infamous "Norway problem" is type coercion gone wrong: the country code NO and the words yes, on, and off are read as booleans under YAML 1.1 unless quoted, so a list of country codes silently turns NO into false. Unquoted version numbers like 1.20 lose their trailing zero by becoming floats, and a leading zero can trigger octal parsing. Compared with JSON, YAML is friendlier to write and supports comments and references, but its whitespace sensitivity and aggressive typing make a validating viewer the fastest way to confirm a file means what you intended.

Common use cases

  • Debugging CI and Kubernetes configs. Confirm indentation and structure in a GitHub Actions workflow, Compose file, or Helm values before a pipeline fails.
  • Resolving anchors. See the effective value of an aliased or merged node instead of mentally expanding & / * references.
  • Catching the Norway problem. Spot values that YAML silently coerced to booleans, floats, or null so you can quote them.
  • YAML to JSON. Convert a config to JSON for a tool that needs it, without sending the file anywhere.

Frequently asked questions

Does it support anchors, aliases, and merge keys?

Yes. The viewer uses a full YAML 1.1 parser, so anchors (&name), aliases (*name), and the merge key (<<) are resolved to their effective values in the tree and in the JSON output.

Can it handle multi-document YAML?

Yes. Files with documents separated by --- are loaded as a stream, and each document is shown as its own numbered root so you can browse them independently.

Why does my unquoted NO or 1.20 look wrong?

That is YAML type coercion. Under the YAML 1.1 spec, words like NO, yes, on, and off become booleans, and 1.20 becomes the float 1.2. Wrap such values in quotes to keep them as strings. The viewer shows you the coerced result so the surprise is visible.

What happens when the YAML is invalid?

The tree is replaced by an error box that names the line and column and describes the issue, such as a forbidden tab character or bad indentation, so you can fix it quickly.

Is my YAML uploaded anywhere?

No. The document is parsed entirely in your browser with client-side JavaScript. Nothing is transmitted, so configuration files and any secrets they contain never leave your device.