YAML Formatter

Paste YAML on the left. See errors, pretty-print the document, or open a collapsible tree of its keys and lists.

Runs entirely in your browser. Your input never leaves this tab.

Input

Output

Other tools

Same site, different job. Your input stays in the browser.

What is YAML?

YAML, short for YAML Ain't Markup Language, is a text format for structured data. It uses indentation to describe nesting, a hyphen for each list item, and key: value for a map. YAML is a superset of JSON: any valid JSON is also valid YAML.

How to use this formatter

  • Paste or type YAML in the input pane.
  • The output pane shows the pretty-printed version.
  • Tree mode opens a collapsible view. Click a toggle to hide a nested key without editing the text.
  • Errors report the line and column where the parser stopped. Fix the indent, quote the value, or check for a missing colon.
  • Format rewrites with a consistent indent. Minify emits the shortest valid form.

Common YAML errors

  • Mixed tabs and spaces. Use spaces only. Two spaces per level is the common choice.
  • A value that starts with a colon or a hyphen but is not quoted, so the parser reads it as a map or a list item.
  • A list where each item has a different indent.
  • An anchor that references an undefined name.
  • Unquoted yes, no, or on. YAML 1.1 reads these as booleans.

Where YAML is used

YAML is the default for Docker Compose files, Kubernetes manifests, GitHub Actions workflows, Ansible playbooks, static-site config such as Astro's astro.config.mjs friends, and many application settings. Its indentation-first shape reads well for short human-authored files.

Runs in your browser

Every parse and render happens on this page. Nothing is uploaded. Large documents stay responsive because only expanded branches of the tree are in the DOM.