Home / Tools / YAML formatter

YAML Formatter and Validator: Fix Indentation Online

Paste YAML to check it and re-indent it cleanly. Errors show what is wrong and where. Good for Docker Compose, Kubernetes and CI files. Runs in your browser.

Paste your YAML and press Beautify. The file is re-indented with the spacing you choose, and a syntax error is reported with its place. It works well for Docker Compose, Kubernetes, GitHub Actions and similar files.

What it does

Example

Before

services:
    web:
        image:   nginx:alpine
        ports: ["8080:80"]
        environment:
          - MODE=dev
          - DEBUG=false

After

services:
  web:
    image: nginx:alpine
    ports: ["8080:80"]
    environment:
      - MODE=dev
      - DEBUG=false

Frequently asked questions

Why does YAML fail with tabs?
YAML does not allow tabs for indentation. Use spaces. The formatter shows an error if it finds a tab.
Does it keep comments?
Yes.
Can it check Docker Compose files?
It checks that the YAML is valid. It does not know the Compose rules, so a valid file can still contain a wrong key.
Does it handle several documents in one file?
Yes. Documents separated by --- are formatted one by one.

Runs in your browser. Nothing you type is sent to this site. Updated 2026-10-11.

More tools

Code formatters

CSS beautifier CSS minifier HTML beautifier HTML minifier JavaScript beautifier JavaScript minifier JSON formatter XML formatter SQL formatter Markdown preview

Converters

Base64 encoder and decoder URL encoder and decoder Unix timestamp converter CSV to JSON JSON to CSV HTML entity encoder and decoder Number base converter Time zone converter JSON to TypeScript XML to JSON HTML to Markdown Date difference calculator

Text tools

Regex tester Remove duplicate lines Lorem ipsum generator Word counter Case converter Text diff checker

Color and images

Color converter Contrast checker Image to Base64 Image resizer

Network

Subnet calculator Download time calculator Common ports list CIDR to IP range IPv6 address expander and compressor MAC address formatter curl command builder

Server and files

Cron expression explainer chmod calculator HTTP status codes

Encoding and security

Password generator UUID generator Hash generator JWT decoder QR code generator Password strength checker Wi-Fi QR code generator