⚡
usefultools.dev
YAML

YAML Formatter & Validator

NOUVEAU

Validate and format YAML in your browser: multi-document files, 2/4-space indent, key sorting and line-width control.

Fonctionne à 100 % dans votre navigateur — vos données ne sont jamais envoyées ni stockées sur nos serveurs.

Cet outil n'est pas encore entièrement traduit : une partie du texte est encore en anglais. L'outil lui-même fonctionne de la même façon dans toutes les langues.

Options

The YAML is parsed first, so any syntax error is reported with its line and column. It is then written out again from the parsed data: comments are not kept, anchors and aliases are expanded, and “Minified flow style” writes each document on one line like {a: 1, b: [1, 2]}.

⚡

Exemples rapides

Des entrées typiques et les résultats produits par cet outil.

Tidy
name: web ports: [80, 443]
name: web ports: - 80 - 443
Sort keys
b: 1 a: 2
a: 2 b: 1
Two documents
a: 1 --- b: 2
a: 1 --- b: 2
Flow style
a: 1 b: [1, 2]
{a: 1, b: [1, 2]}
📖

Présentation

YAML Formatter & Validator checks that your YAML is valid and rewrites it with consistent spacing. Paste a file, and the tool parses every document in it, reports the first syntax error with its line and column, and prints clean output using 2 or 4 spaces.

Options cover what teams usually agree on: sort keys alphabetically for stable diffs, set the preferred line width (80, 120 or no wrapping), or write each document as one line in flow style. Files with several documents separated by --- are kept as separate documents.

The YAML is rewritten from parsed data, so comments are not kept and anchors are expanded. Everything runs in your browser.

Pourquoi utiliser cet outil ?

  • Finds YAML syntax errors before a deploy or CI run does
  • Gives every file the same indent, list style and key order
  • Handles multi-document files such as Kubernetes manifests
  • Local only — configuration with secrets is not uploaded
⭐

Fonctionnalités

✅

Validation

Reports the first error with line, column and the line itself.

📑

Multi-document

Every document separated by --- is checked and formatted.

🔢

Indent 2 or 4

Choose the indentation of nested mappings and lists.

🔤

Sort keys

Alphabetical keys at every level for readable, stable diffs.

↔️

Line width

Wrap long text at 80 or 120 characters, or never.

⬇️

Copy or download

Copy the result, download a .yaml file, or reuse it as new input.

🛠️

Mode d'emploi

1

Add your YAML

Paste it, open a .yaml / .yml file, or press Load sample.

2

Check validity

A green line confirms the YAML is valid and how many documents it has; a red box shows the error.

3

Set the style

Pick indent, line width, key sorting or flow style.

4

Copy or download

Use Copy, Download .yaml, or Use output as input to keep editing.

🤔

Questions fréquentes