Skip to content
Engyna

YAML Viewer & Validator

Check YAML for indentation and syntax errors and explore it as a tree.

How to use the YAML Viewer & Validator

  1. 1Drop a .yaml or .yml file, or paste YAML.
  2. 2See errors such as bad indentation or duplicate keys right where they happen.
  3. 3Browse the tree, including multi-document files, and copy it as JSON.

About YAML Viewer & Validator

The YAML Viewer & Validator checks .yaml and .yml files for syntax errors such as bad indentation, tabs, unclosed quotes and duplicate keys. Errors and warnings are listed with their line and column and highlighted in the editor, so a broken YAML file can be fixed in place without guessing which line is wrong.

Next to the source, the YAML viewer shows the parsed data as a tree, including files that contain several documents separated by ---. The status bar counts documents, values and nesting depth. Format re-indents the file with two or four spaces, and Copy as JSON turns the parsed content into JSON, which helps when you need to check how a value is actually interpreted, for example whether something is read as a string, a number or a boolean.

This YAML lint tool is useful for anyone who edits configuration by hand: Kubernetes manifests, Docker Compose files, GitHub Actions and other CI pipelines, Ansible playbooks or static site settings. Paste a snippet from a pull request or drop a whole file to validate YAML before you deploy it.

Frequently asked questions

Can it read Kubernetes and Docker Compose files?

Yes. Any YAML 1.2 file works, including files with several documents separated by ---.

Why does my YAML fail when it looks fine?

Common causes are tabs used for indentation, inconsistent indent levels and unquoted values containing a colon. The error message points to the exact spot.

How do I convert YAML to JSON?

Open the YAML file and use Copy as JSON once it is free of errors. A file with several documents becomes a JSON array with one entry per document.

Why do values like no or on sometimes become true or false?

YAML 1.1, still used by some older parsers, treats yes, no, on and off as booleans. YAML 1.2, which this viewer follows, only treats true and false as booleans. Quoting such values keeps them strings in every parser.

Guides