Processed locally — your file never leaves your device
YAML Formatter
Tidy up YAML indentation and spacing — paste text or open a file, entirely in your browser.
How it works
- Paste YAML, or open a .yaml/.yml file.
- Click Format.
- Copy the tidied YAML or download it.
Frequently asked questions
- Is my YAML uploaded anywhere?
- No. It's parsed and re-emitted by your browser. That matters for the files people usually format: CI pipelines, Kubernetes manifests and deployment configs routinely contain internal hostnames and service names.
- Can I choose tabs for indentation?
- No, and deliberately — the YAML specification forbids tabs as indentation, so offering the option would produce a file most parsers reject. Formatting uses spaces.
- Are my comments preserved?
- No. Formatting parses the document into data and writes it back out, and comments aren't part of that data. If comments matter, keep the original — this tool never modifies your file, it produces a new result.
- Will it rewrite my values or add anchors?
- No. Repeated values are written out in full rather than replaced with anchors and aliases, and long strings aren't folded across lines. Tidying shouldn't hand back a document you don't recognise.
- Does it check whether the YAML is valid?
- Formatting fails with a specific parse error if the document is malformed, so an invalid file can't format successfully. If checking is all you want, use the YAML Validator.