YAML Formatter & Minifier
Beautify YAML with Prettier, or tighten blank lines. This tool beautifies and minifies YAML on one page — paste your code, pick a mode, and click. Everything runs on your device, nothing is sent to a server.
Everything runs in your browser. Your code is never sent to our servers.
Example
Example Input
name: Aji tags: [a, b]
Example Output
name: Aji tags: [a, b]
How to Use
- 1Choose Format or Minify mode at the top.
- 2Paste your YAML code into the Input field.
- 3If needed, set the indent width in "More settings".
- 4Click the button (or press Ctrl+Enter) to process. The result appears in the Output field.
- 5Click Copy to copy the result.
About the YAML Formatter
The YAML Formatter beautifies YAML documents using Prettier so indentation and spacing are consistent — important because YAML is highly indentation-sensitive.
How it works: Format runs Prettier's YAML parser to normalize indentation, spacing after colons, and list style. Minify tightens blank lines and removes trailing spaces.
YAML is widely used for configuration (CI/CD, Kubernetes, Docker Compose). Consistent formatting prevents hard-to-trace indentation errors.
FAQ
Can this YAML tool both format and minify?
Yes. One page with a toggle — Format mode prettifies (beautifies) with indentation, and Minify mode compacts it. No need for two separate pages.
Is my code sent to a server?
No. YAML is processed entirely in your browser using JavaScript/WebAssembly. Your code never leaves your device.