YAML Parser

Parse YAML and inspect the resulting document structure.

YAML Input
Parsed Structure
paste YAML to inspect its structure

Related Tools

Documentation

What is YAML Parser?

YAML Parser loads a YAML document and shows it as a collapsible, searchable tree — the same interactive JsonTree view used across DevFormats — so you can inspect a config file's actual shape (which keys nest under which, where lists live) without a separate output file.

How it works

Input is parsed with js-yaml's load(), which supports YAML's default schema — nested maps and sequences, anchors and aliases, multi-line block scalars, and automatic typing of plain scalars (unquoted true/false/numbers/null). The parsed JavaScript value is handed directly to the tree view for display. On a parse failure, js-yaml throws a YAMLException carrying a mark object with an exact line and column, which the tool surfaces in the error bar and highlights in the input gutter — a more precise error location than XML's best-effort line extraction.

Features

  • Collapsible, searchable tree view of the parsed document
  • Supports anchors/aliases, multi-line strings, and standard scalar types
  • Precise line/column error reporting from js-yaml's mark data
  • Live re-parsing as you type
  • Load a .yaml/.yml file directly from disk

Example

Input:

name: DevFormats
tools:
  - json-formatter
  - yaml-formatter
meta:
  free: true

Tree view shows the equivalent of: { name: "DevFormats", tools: ["json-formatter", "yaml-formatter"], meta: { free: true } }

Common errors

Mixing tabs and spaces for indentation is the single most common failure, since YAML uses indentation itself to express nesting and rejects tabs outright. A missing colon after a mapping key, or a list item indented at a different level than its siblings, also produce a YAMLException with an exact line/column pointing at the offending indentation.

Best practices

Use this tool to sanity-check how YAML anchors and aliases actually resolve — since the tree view shows the fully expanded values, it's an easy way to confirm an alias points where you think it does before that config file reaches production.

Frequently Asked Questions

What does this show that the YAML Formatter doesn't?

It shows the parsed structure as a collapsible tree, rather than reformatted YAML text — useful for understanding a document's shape at a glance.

What YAML features are supported?

Anything js-yaml's default schema supports: nested maps and sequences, anchors/aliases, multi-line strings, and standard scalar types.

Is my YAML uploaded anywhere?

No — parsing runs entirely in your browser via js-yaml.