YAML Formatter & Validator

Format, validate, and tidy YAML — including multi-document files — with precise error locations, entirely in your browser.

source.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
formatted.yamlValid · 2 documents
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

Your Data Never Leaves Your Device

Every tool runs entirely in your browser. Nothing you type is uploaded, stored, or logged on our servers.

100% Client-Side

The YAML Formatter & Validator normalises indentation, quoting, and line wrapping while checking that your document actually parses. Errors are reported with a line and column, which matters in YAML more than most formats — the usual causes are a tab used for indentation, a missing space after a colon, or an inconsistent list indent, and all three are easy to miss by eye.

Multi-document files separated by --- are fully supported, so a Kubernetes manifest bundling a Deployment and a Service formats as one unit. Because the tool works on the parsed document tree rather than round-tripping through JSON, your comments survive formatting — including when you alphabetise keys, which is a quick way to make two config files diffable. Everything runs in your browser, so manifests containing hostnames or credentials never leave your machine.

FAQ

Yes. Documents separated by --- are each parsed and re-emitted, so Kubernetes manifests bundling a Deployment and a Service in one file work correctly.

Yes. The formatter works on the parsed document tree rather than converting to JSON and back, so comments stay attached to the keys they describe — including when you sort keys.

Each error is reported with its line and column, so you can jump straight to the problem — the usual culprits being tabs used for indentation or a missing space after a colon.

Sorting is recursive: keys are alphabetised at every level of nested mappings, including mappings inside list items, which makes two config files much easier to diff.

YAML forbids tabs for indentation entirely — only spaces are allowed. Replace leading tabs with spaces and the file will parse.

No. Parsing and formatting run entirely in your browser, so config files containing hostnames or credentials never leave your machine.