Cette page n’est pas encore traduite en français : elle s’affiche en anglais.

YAML Validator & Linter

Paste a Docker Compose file, Kubernetes manifest, GitHub Actions workflow or any YAML to pinpoint errors, catch common pitfalls and get a cleanly formatted version.

Mis à jour le
Open file

Vos données ne quittent jamais votre ordinateur. Tout le traitement se fait localement dans votre navigateur.

Comment utiliser : YAML Validator

  1. Paste YAML or open a .yml / .yaml file.
  2. Errors show the line, column and a pointer to the exact spot.
  3. Review the lint warnings for tabs, trailing spaces and YAML 1.1 pitfalls.
  4. Copy the formatted YAML or the JSON equivalent.

Why YAML breaks so easily

YAML uses indentation for structure, so a single misplaced space changes the meaning or makes the file invalid. The most common errors:

ErrorCause
bad indentation of a mapping entryA key is indented differently from its siblings
found a tab characterYAML forbids tabs for indentation — use spaces
duplicated mapping keyThe same key appears twice in one object; most parsers silently keep the last one
incomplete explicit mapping pair / unexpected endAn unclosed quote, bracket or a colon inside an unquoted string
end of the stream or a document separator is expectedContent at the wrong indentation after a list or block

YAML 1.1 vs 1.2 gotchas

Many tools (PyYAML, older Ruby and Go libraries) still follow YAML 1.1, where yes, no, on, off are booleans and 012 is octal — the famous “Norway problem” where the country code NO becomes false. YAML 1.2 treats these as strings. The linter flags such values so you can quote them and get the same result everywhere.

Multi-document files

Kubernetes manifests often combine several resources separated by ---. Each document is validated and shown in the JSON output as an array.

Validating meaning, not just syntax

Valid YAML can still be a wrong configuration. For structure checks against a schema, convert to JSON and use the JSON Schema validator; for API specs, the OpenAPI validator. Build new files with the Docker Compose generator or GitHub Actions generator, and convert formats with YAML to JSON.

Aussi recherché comme : yaml lint, yaml checker, validate yaml, yaml syntax check, yamllint online, yaml formatter, kubernetes yaml validator.

Outils complémentaires : YAML Validator

  • JSON to YAML — Paste JSON and get clean YAML for Kubernetes manifests, Docker Compose, GitHub Actions or any config file.
  • Kubernetes YAML Generator — Fill in your app’s name, image and port and get production-ready Kubernetes YAML: a Deployment with probes, resource limits and a hardened security context, plus the Service, Ingress with TLS, ConfigMap, Secret and HorizontalPodAutoscaler you tick — in one file ready for kubectl apply.
  • systemd Service Generator — Run your app as a proper Linux service that starts on boot and restarts when it crashes.
  • GitLab CI Generator — Pick your stack and get a working .gitlab-ci.yml: install with caching, lint and test jobs, a build with artifacts, a Docker image pushed to the GitLab registry, or a GitLab Pages deploy — with rules that run pipelines for merge requests and your default branch without duplicates.

Questions fréquentes

Why does my YAML say “bad indentation”?
A key or list item is indented with a different number of spaces than its siblings. Align it with the other entries at the same level; the pointer shows the column.
Can YAML use tabs?
No. The YAML specification forbids tabs for indentation. Replace them with spaces (2 is the common convention).
Does it validate Kubernetes or Docker Compose rules?
It checks YAML syntax and common pitfalls, not the meaning of each field. Use the tool’s JSON output with a JSON Schema for structural validation.
Is my YAML uploaded?
No. Everything runs in your browser.
Puis-je installer YAML Validator en tant qu’application web et l’utiliser hors ligne ?
Oui. YAML Validator est une application web installable (PWA) : elle s’installe depuis votre navigateur, sans passer par une boutique d’applications. Cliquez sur « Installer l’application » en haut de cette page dans Chrome ou Edge (Windows, macOS, Linux, ChromeOS) ; sur Android, utilisez « Partager » → « Ajouter à l’écran d’accueil » sur iPhone et iPad ; ou « Fichier » → « Ajouter au Dock » dans Safari 17+ sur Mac. L’application s’ouvre alors dans sa propre fenêtre avec sa propre icône, et comme elle s’exécute entièrement dans votre navigateur, elle continue de fonctionner hors ligne. Firefox sur ordinateur de bureau ne permet pas d’installer d’applications web. Comment fonctionne l’installation.

Outils similaires