ShuttleLab

Format YAML Online — Free, Private, Instant

Paste minified or messy YAML below and get a clean, indented version instantly. Runs entirely in your browser — your data never leaves your device.

YAML 校验

What is YAML formatting?

YAML formatting (also called pretty-printing or beautifying) rewrites a YAML document with consistent indentation, line breaks, and spacing so it is readable by humans. The data itself does not change — only the whitespace. Minified YAML like name: Ada skills: [math, logic] becomes:

name: Ada
skills:
  - math
  - logic

When do you need to format YAML?

  • Kubernetes deployments — a misindented containerPort causes silent failures. Formatted YAML makes structure visible.
  • Helm charts — complex nested values files are impossible to scan when everything is on one line.
  • GitHub Actions workflows — indentation errors in .github/workflows/*.yml silently prevent triggers.
  • Code reviews — formatted YAML diffs cleanly in git or any diff tool.
  • Debugging docker-compose — a docker-compose.yml with wrong indentation reports "invalid type" without pointing to the line.

How to format YAML with YAML Shuttle

  1. Paste your YAML into the input box at the top of this page.
  2. Click “Beautify”. YAML Shuttle parses your input and re-emits it with 2-space indentation.
  3. Copy the result from the output area. The formatted version is valid YAML 1.2, semantically equivalent to your input.

If your YAML has syntax errors, the formatter will show the line and column of the first error. Use the validation mode to see detailed error messages with the problematic line highlighted.

Common YAML formatting issues

Tab indentation
The YAML 1.2 spec explicitly forbids tab characters for indentation. Use spaces only — 2 spaces is the community standard for Kubernetes and Helm.
Missing colon after key
Every mapping key must be followed by a colon and a space: key: value. Writing key value is invalid.
Incorrect list indentation
List items under a mapping key must be indented relative to the key. A hyphen at the same level as its parent key causes a parse error.
Mixed tabs and spaces
Mixing tabs and spaces produces unpredictable parsing behavior. YAML Shuttle's beautifier normalizes everything to spaces.

Frequently Asked Questions

Is the YAML formatter free?
Yes. YAML Shuttle's formatter is completely free with no signup or ads. The entire tool runs in your browser.
Does the formatter send my YAML to a server?
No. Formatting happens entirely client-side. Your YAML is processed by JavaScript running in your browser and never sent to any server. This makes YAML Shuttle suitable for sensitive data like Kubernetes secrets or API credentials.
What indentation does the formatter use?
YAML Shuttle defaults to 2-space indentation, which matches the Kubernetes and Helm community conventions. The YAML 1.2 spec forbids tab characters, so the formatter always uses spaces.
Can the formatter handle large YAML files?
For best performance, keep input under ~5 MB. Modern browsers can handle larger files but the UI may slow down. For multi-gigabyte YAML, consider streaming tools like yq instead.
Does it work offline?
Yes. After the page loads once, you can disconnect and the formatter still works. Bookmark the page for offline use.

Related YAML tools