YAML Tools
Tools for YAML configuration such as Kubernetes manifests, CI pipelines and application settings. Indentation errors are reported with the line and column so you can fix them quickly.
Popular YAML Tools
All YAML Tools (3)
About YAML
YAML is a human-friendly data format in which indentation shows structure. These tools use the open-source js-yaml library (version 4), which follows YAML 1.2. One practical consequence: the words yes, no, on and off are plain strings, while some older YAML 1.1 parsers still read them as booleans. Quoting such values avoids surprises across tools. An unquoted date such as 2024-01-05 is read as a timestamp, not as text.
Indentation must use spaces; a tab character used for indentation is an error. Duplicate keys in the same mapping are also rejected.
Which tool to use
Use the YAML Validator to check a file without changing it: comments and layout are left alone. The YAML Formatter rewrites the file from its parsed data, which normalises indentation and quoting but drops comments, so it suits generated files better than hand-maintained ones. When a value behaves unexpectedly, YAML to JSON shows the type each value was given, and the YAML Viewer shows the same data as a collapsible tree.
Worked example: Validating and formatting a Kubernetes Deployment YAML manifest
Suppose you are editing a Kubernetes Deployment or GitHub Actions workflow where indentation determines whether ports belongs to the container or to the pod spec:
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-gateway
spec:
replicas: 3
template:
spec:
containers:
- name: proxy
image: nginx:1.27-alpine
ports:
- containerPort: 8080
- In the YAML Validator: Confirms that no tab characters (
\t) are mixed into the indentation, colons are followed by spaces, andcontainersparses as a valid sequence of mappings. - In the YAML Formatter: Normalizes the entire document to clean 2-space indentation.
- In the YAML Viewer / YAML to JSON: Inspects the exact parsed tree (
spec.template.spec.containers[0].ports[0].containerPort = 8080) so you can verify that no list item was accidentally indented under the wrong parent key.
Limits and what this tool cannot do
- Checks YAML 1.2 syntax, not Kubernetes/Docker Compose/Ansible schema rules: A YAML file can be 100% syntactically valid YAML even if you misspell a Kubernetes field name like
containerPortascontainer_port. - CloudFormation / GitLab custom
!Refor!Subtags: Standard YAML parsers validate standard mappings, sequences, and scalars (&anchor/*alias); proprietary cloud-provider tags may need quoting when converting to JSON.
Frequently asked questions
Why does YAML reject my tab characters?
The YAML specification forbids tabs for indentation. Replace them with spaces; two spaces per level is the common convention.
Does formatting keep my comments?
No. The formatter parses the YAML and writes it out again, and comments are not part of the parsed data. Keep a copy if your comments matter.
Do the YAML tools need an internet connection?
Once. The js-yaml library is loaded from this site the first time you run a YAML tool. Your YAML is processed in your browser and is not sent anywhere.
What is the 'Norway problem' (NO: false) in YAML?
In older YAML 1.1 parsers, unquoted two-letter strings NO, No, no, ON, OFF, YES, and Y are parsed as booleans (false or true), turning the ISO country code for Norway (NO) into false! Always wrap country codes, version numbers (3.10), and hex strings in quotes ("NO", "3.10").
Why does YAML forbid tab characters for indentation?
Different text editors display a tab character as 2, 4, or 8 spaces wide, making it impossible for a parser to know which indentation level a tab-indented line belongs to when mixed with spaces. The YAML specification strictly requires space characters for indentation.
Common use cases
- Checking a Kubernetes or Docker Compose file before applying it
- Finding the line that breaks a CI pipeline definition
- Seeing exactly how a parser reads a tricky value
- Converting YAML settings to JSON for another tool
Example
service: api
replicas: 3
ports:
- 8080
- 8443
labels:
tier: "backend"Two-space indentation, a list of numbers, and a quoted string value.