Messy input
name: app
version: 1.0
services:
- web
- db
env:
DEBUG: trueThe YAML Formatter cleans up YAML documents by normalizing indentation, spacing, and list and map layout so the structure becomes clear and consistent. It helps surface the indentation mistakes that commonly break YAML parsing, and presents nested mappings and sequences in a tidy, predictable form. All processing runs in your browser, so configuration files containing hostnames, secrets, or environment data are never uploaded.
YAML (YAML Ain't Markup Language) is a human-friendly data serialization format widely used for configuration in tools like Docker Compose, Kubernetes, GitHub Actions, and CI pipelines. It uses indentation rather than braces to express nested maps and lists, which makes it readable but sensitive to whitespace. Consistent formatting matters because a single misaligned line can change meaning or cause a parse error, so a formatter helps keep configs valid and easy to review.
The main file is the entry point for each run.
Use the Input panel to pipe standard input to your program when it needs data.
Run sends your code to a fresh hosted runtime and streams the result into the output panel.
Your draft stays in this browser, and Share creates a separate snapshot link.
name: app
version: 1.0
services:
- web
- db
env:
DEBUG: truename: app
version: 1.0
services:
- web
- db
env:
DEBUG: trueserver:
host: localhost
port: 8080
options:
- keepalive
- gzipusers:
- name: Ada
role: admin
- name: Bob
role: editordescription: |
Line one of the text.
Line two of the text.
summary: >
This folds onto
a single line.---
kind: Service
name: web
---
kind: Deployment
name: web
replicas: 3defaults: &defaults
retries: 3
timeout: 30
prod:
<<: *defaults
timeout: 60defaults: &defaults
retries: 3
timeout: 30
prod:
<<: *defaults
timeout: 60matrix:
node: [16, 18, 20]
os: [linux, macos]
point: { x: 1, y: 2 }The editor uses Monaco, the engine behind VS Code, with language-aware editing tools and familiar keyboard controls.
Paste a YAML document and it normalizes indentation, spacing and layout.
Nested mappings and sequences are presented in a tidy, predictable form.
List and map structure is made consistent throughout the file.
Surfaces the indentation mistakes that commonly break YAML parsing.
Since YAML is whitespace-sensitive, consistent alignment keeps meaning intact.
Ideal for Docker Compose, Kubernetes, GitHub Actions and CI configs.
All processing runs in your browser; config files are never uploaded.
Hostnames, secrets and environment data stay on your machine.
Copy the cleaned YAML back into your config repo.
Use it to keep configs valid and easy to review.
Output
Start typing to auto-process