๐ Runs in your browser โ nothing is uploadedโ Free, no signup
YAML Formatter & Validator
Paste YAML to check it for errors and format it with consistent indentation. Comments are kept, and errors show the exact line and column.
0 characters
Formatted YAML
When should you use the YAML Formatter?
- Checking a Kubernetes manifest, Docker Compose file or GitHub Actions workflow before applying it
- Fixing indentation errors in a YAML config
- Making messy or inconsistent YAML tidy and readable
How to use the YAML Formatter
- 1
Paste YAML
Paste a file or snippet. Multiple documents separated by --- are supported.
- 2
Check validation
If the YAML is invalid you'll see the line, column and reason.
- 3
Choose formatting
Pick 2 or 4 spaces and single or double quotes.
- 4
Copy or download
Copy the formatted YAML or download it as a .yaml file.
Examples
Inconsistent indentation fixed
Before
kind: Deployment
metadata:
name: web
labels: {app: web}After
kind: Deployment
metadata:
name: web
labels: { app: web }Common errors and how to fix them
bad indentation of a mapping entry- A line is indented by a different amount than its siblings. YAML uses spaces only โ check for a tab or an extra space.
Values like yes, no or on changed meaning- Some YAML parsers read yes/no/on/off as booleans. Quote them ("yes") if you mean the text.
More from JSON Tools
Free tools that run in your browser โ no signup, nothing uploaded.
JSON Auto-Fixer & Formatter
Repair, validate, and beautify broken JSON (missing quotes, trailing commas).
JSON Validator & Linter
Check JSON syntax and see the exact line and column of every error.
JSON Viewer (Tree)
Explore JSON as a collapsible tree with search and click-to-copy paths.
JSON Editor
Edit JSON with live validation, a tree view, formatting and key sorting.
JSON Beautifier
Pretty-print and indent JSON for easy reading and debugging.
JSON Compare & Diff Tool
Find the difference between two JSON objects visually and quickly.
JSON Sorter (Sort Keys)
Sort JSON object keys alphabetically, including nested objects.
JSONPath Tester
Evaluate JSONPath expressions with filters and recursive queries.
JSON Schema Generator
Generate a JSON Schema from any sample JSON document.
YAML Formatter FAQ
Yes. Formatting uses Prettier's YAML formatter, which keeps comments, anchors and document separators.
No โ YAML only allows spaces for indentation. Tabs cause an error.
It checks that the YAML is syntactically valid. It doesn't check Kubernetes or Compose-specific fields.
YAML is a superset of JSON designed for humans: indentation instead of braces, comments, and less quoting. Use the YAML to JSON converter to switch between them.
Yes. Files with several documents separated by --- are validated and formatted.
No. Everything runs in your browser, so your YAML never leaves your device.
