YAML Formatter is a yaml formatter that also works as a yml formatter, right in your browser. You paste YAML or open a .yaml or .yml file, and it comes back with clean, consistent indentation, comments included. Your text never leaves your device: nothing is sent to a server, nothing is stored, and it spends no credits.
Config files grow by hand, one edit at a time. Over months the indentation drifts, lists switch between styles and the file gets harder to read and review. Formatting brings it back to one consistent layout, so the next diff shows only what really changed.
What is the difference between YAML and YML?
There is none. YAML is the format, and .yaml and .yml are two extensions for the same files. The shorter .yml comes from the days when extensions were limited to three letters, and many tools still use it. This page formats .yml files and .yaml files the same way.
How do I format YAML without losing comments?
- Comments stay. Notes you left in a config file are kept where you wrote them.
- Indentation. Pick 2 or 4 spaces, whichever your project uses.
- Sort keys. Turn it on to list every mapping’s keys in order, which makes two versions easier to compare.
- Several documents. Files with documents separated by
---are formatted in one go. - Copy or download. Take the result back to your editor, or save it as a .yaml file.
What if the YAML is broken?
The formatter needs YAML it can read, so if something is wrong it shows the error with the line and column instead of a result. For checking as the main job, with a jump to the exact spot as you type, use the YAML Validator. Need the same data as JSON? Use YAML to JSON.
Who it’s for
- Developers tidying CI pipelines, Docker Compose files and deployment manifests.
- Teams that want config files to look the same before review.
- Writers keeping front matter tidy in Markdown files.
- People who don’t want to paste private config into a stranger’s server.
FAQ
Is my YAML sent to a server?
No. Formatting runs entirely in your browser. Your text never leaves your device and nothing is stored.
Can I format a .yml file here?
Yes. YAML and YML are the same format, so you can paste the text or open a .yml file and format it the same way.
What does it cost?
It comes with the Nexin library: Nexin Lite or Nexin Pro opens it, and it spends no credits.