YAML Viewer, Formatter & Validator
View YAML as a table, format it and check it for errors, YAML 1.1 surprises and Kubernetes or Compose mistakes. Comments are kept.
Runs in your browser. Nothing is uploaded.
Paste JSON to see it as a table.
Paste YAML to check it. Click a problem to jump to its line.
How to use the YAML Viewer, Formatter & Validator
- Paste your YAML into the left box, open a .yaml or .yml file, or press Load example for a sample that suits the open tab.
- On Format, the tidy YAML appears as you type. Choose 2 or 4 spaces, tick Sort keys, or Expand inline lists to turn
[a, b]into one item per line. - On Validate, pick Check as: plain YAML (syntax and YAML 1.1 surprises), a Kubernetes manifest or a Docker Compose file.
- Click a problem in the list to jump to its line, fix it, and watch the list update.
- Copy or download the result, or press Use result as input to keep working on the formatted file.
One place for YAML
YAML is the language of configuration: Kubernetes manifests, Docker Compose files, GitHub Actions workflows, Ansible playbooks and countless application settings are written in it. It is meant to be easy to read, but indentation carries meaning, so a file edited by several people soon mixes two and four spaces, inline and block lists, and stray spacing. Worse, a file can look right and still fail: a missing space after a colon, a tab, or a value one parser reads differently from another. This page keeps your YAML in one box and gives you two tabs to work on it.
Format
The formatter parses the file and writes it back with one consistent style: the indentation you
choose, one space after every colon, and list items lined up under their parent. Comments stay where
they were, anchors and aliases are kept, and multi-document files keep their --- separators.
Sort keys orders every mapping alphabetically, which makes two versions of a config easy to
compare. Expand inline lists turns flow style such as [a, b] and {a: 1} into block style, one
item per line, which produces cleaner diffs in code review.
If the file can’t be read, nothing is guessed: the message names the line and column, and the spot is marked in the editor.
Table
Lists of records are common in YAML: products, users, services, hosts. The Table tab shows a list as
rows and columns, one column per key, so you can compare values at a glance. Pick which list to show,
click a column to sort, type to filter, open nested values as their own table, and copy or download the
view as CSV. A file with several documents (---) shows one row per document.
Validate
Choose what the file is supposed to be:
- YAML checks syntax and portability. A file can be valid YAML 1.2 and still behave oddly in a
YAML 1.1 parser, the version many libraries still implement. Country codes like
NO, words likeyesandoff, numbers with a leading zero and times like22:30are all flagged with the quoting that makes them safe everywhere. - Kubernetes manifest applies the API rules for common kinds such as Deployment, Service, Ingress, ConfigMap and CronJob: current apiVersions, valid names and labels, matching selectors, string env values, valid CPU and memory units, and good practice such as pinned image tags and resource limits.
- Docker Compose file checks services, images and builds, port and volume syntax, environment
values,
depends_ontargets, networks and the YAML 1.1 port trap where22:22becomes a number.
Every problem has a severity, a line number and a plain-language fix. Click it to jump to the line.
Format and check together
Clean up a file on Format, press Use result as input, then switch to Validate to confirm it is still correct. Both tabs read the same input, so you can move between them as often as you like without copying anything.
Everything runs locally in your browser, which makes it safe for production configs and secrets.
Frequently asked questions
Does formatting change what my YAML means?
No. The tool parses your file and writes the same data back with consistent indentation and spacing. Keys, values, anchors and comments stay as they were. Only Sort keys changes the order of keys, and order inside a mapping does not change its meaning.
What does the plain YAML check look for?
Syntax errors such as tabs, bad indentation and duplicate keys, with line and column. It also warns about values that YAML 1.1 parsers (PyYAML, older Ruby and Go libraries) read differently, such as NO becoming false, 0755 becoming 493 and 22:30 becoming a base-60 number.
What do the Kubernetes and Docker Compose checks add?
The rules of each format: removed apiVersions, invalid names, selectors that don't match pod labels, unquoted env values and bad resource units for Kubernetes; unknown keys, bad port mappings, missing services and floating image tags for Compose. Untick Show tips to see only errors and warnings.
Does this replace kubectl apply --dry-run or docker compose config?
No. Those check against your real cluster or Docker install. This page catches the common mistakes earlier, without a cluster or credentials, and explains them in plain words.
Can it handle files with several documents separated by ---?
Yes. Every document is formatted and checked in turn, and the separators are kept, so a multi-document Kubernetes manifest comes out in one piece.
Is my file uploaded?
No. Parsing, formatting and checking happen in your browser. Configuration files often contain hostnames, passwords or tokens, and none of that leaves your device.
Tutorials
How to clean up a messy YAML config file
Turn a YAML file with mixed indentation and inline lists into one consistent, readable style without losing comments.
How to fix a Kubernetes Deployment that won't apply
Find and fix the common mistakes in a Deployment manifest, from an old apiVersion to unquoted env values and wrong memory units, before kubectl rejects it.
How to fix the YAML Norway problem and similar bugs
Find YAML values that older parsers read as booleans, octal numbers or times, such as NO, on, 0755 and 17:30, and quote them so every tool agrees.