YAML Formatter and Validator
Check YAML with a full YAML 1.2 parser, see errors by line, catch values older YAML readers misread (yes, no, 0755, 22:22), tidy the indentation, and turn YAML into JSON or JSON into YAML.
Check YAML with a full YAML 1.2 parser, see errors by line, catch values older YAML readers misread (yes, no, 0755, 22:22), tidy the indentation, and turn YAML into JSON or JSON into YAML.
About this tool
YAML Formatter and Validator checks configuration files such as docker-compose.yml, Kubernetes manifests, GitHub Actions workflows and Ansible playbooks before they break a deployment. Paste the YAML, open a .yml or .yaml file, or drop it on the box. It is read with a full YAML 1.2 parser, so a mistake is reported with its line and column and a snippet of the line; click the line number to jump to it. Duplicate keys and tabs used for indentation are reported as errors, because many tools quietly accept them and then use the wrong value. Valid YAML is written back with even indentation of two or four spaces, keys can be sorted A to Z, and files with several documents separated by --- are kept as separate documents. The summary line counts the keys, how deep the data goes, and any anchors and aliases. A second check looks for values that YAML 1.1 readers, still used by PyYAML, Ansible, Ruby and Go yaml.v2, read differently from YAML 1.2. The best known is the Norway problem: country: NO becomes false. The tool also flags yes, no, on, off, y and n, numbers with a leading zero such as 0755 that old readers take as octal, times and ports such as 22:22 that they read as base-60 numbers, and numbers with underscores. For each one it shows the line and the fix, usually putting the value in quotes. Choose JSON as the output to get the same data as JSON, for an API or a JSON schema. JSON is valid YAML, so pasting JSON gives you YAML. Comments are not carried into the formatted copy; the tool says so when your file has them. Copy the result or download it as a .yaml or .json file. Everything runs in your browser.

Paste, open or drop a file.
Errors and YAML 1.1 traps by line.
Clean YAML or JSON.
As .yaml or .json.
Errors with line and column.
NO, yes, on, 0755, 22:22.
Reported, not silently replaced.
Convert either way.
Kept apart with ---.
Nothing is uploaded.
Check before you deploy
Ports and environment variables.
Exampleports: "22:22" quoted.
Manifests with several documents.
ExampleDeployment --- Service.
Workflow files before you push.
Exampleon: push read correctly.
Playbooks read by PyYAML.
Exampleenabled: yes becomes true.
Lists of countries.
ExampleNO stays Norway.
YAML config as JSON.
ExampleOpenAPI to JSON.
Avoid the classic traps
Write "yes", "no", "on" and "off" in quotes when you mean the word.
Postcodes, file modes and IDs such as 0755 keep their zeros only in quotes.
YAML allows only spaces for indentation.
Write "22:22" so no reader turns it into a number.
Senior Software Engineer · Developer of Toolyconvert
Hemant developed YAML Formatter and Validator and tests it on desktop and mobile with real files. He is a senior software engineer from Dehradun, India, building websites since 2014, and designed and developed Toolyconvert end to end.
Last updated 29 November 2026
Featured on
Toolyconvert is listed on these product directories and launch platforms.