YAML Toolkit
Format, validate, and convert YAML online — instantly, for free.
- Client-side processing
- Privacy-first
- Unlimited usage
- No account required
- Secure by design
Frequently asked questions
- Is my YAML uploaded anywhere?
- No. All formatting, validation, tree exploration, and conversion happen entirely in your browser — nothing is sent to a server.
- Which YAML version does this support?
- This tool parses YAML 1.2 core schema using the `yaml` npm package. Some YAML 1.1-only or processor-specific behaviors — for example implicit `!!binary` tags or bare `on`/`off` as booleans — may differ from other tools, including some YAML 1.1-based parsers still used by older systems.
- Does formatting preserve comments and anchors?
- Yes — Format re-serializes the parsed document, which preserves comments, key order, anchors, and aliases. Compact YAML does not: it produces a single-line JSON-flow representation and drops comments, anchors, and aliases, which is disclosed next to that action.
- What does the duplicate-key warning mean?
- YAML allows the same key to appear more than once in a mapping, but different processors resolve that differently — this tool keeps the last value (matching the underlying parser) and shows a warning naming the key and line so you can fix the source.
- Why isn't tab indentation supported?
- The YAML spec disallows tabs for indentation. Tab-indented input is flagged with the exact line so you can switch to spaces, rather than being silently reinterpreted.
- How are multiple YAML documents (separated by ---) handled?
- Converting to JSON turns a multi-document file into a JSON array, one element per document — a warning states this explicitly rather than silently converting only the first document.
- Why would the same YAML mean two different things in two different tools?
- Most real-world differences come from schema version (1.1 vs. 1.2 changed how bare words like on, off, yes, and no resolve) or from a tool's own custom tags — this toolkit follows the YAML 1.2 core schema, so a value that a YAML-1.1-based tool treats as a boolean may be treated as a plain string here.
- Can I use this to write a Kubernetes manifest from scratch?
- It's better suited to cleaning up, validating, and exploring YAML you already have than authoring one from nothing — for scaffolding a new manifest, start from your cluster's or CI system's own templates, then use this toolkit to validate and format the result.
You might also need
What is the YAML Toolkit?
The YAML Toolkit cleans up Kubernetes manifests, CI/CD pipelines, Docker Compose files, and application config so they're easy to read, checks that they're syntactically valid with precise line and column errors, and helps you explore deeply nested structures. Paste any YAML document, format it with clean 2- or 4-space indentation, validate it, browse it as a collapsible tree, or convert it to and from JSON — all processed locally in your browser. YAML trades JSON's explicit brackets and quotes for whitespace and context, which makes it more pleasant to hand-write but far easier to break silently: a single misplaced space changes what a key belongs to, tabs are outright disallowed by the spec but produce no visual warning in a plain text editor, and a duplicate key is technically valid YAML that quietly discards one of its values depending on the parser. None of those problems announce themselves the way a missing curly brace does in JSON — they just produce a document that parses successfully into the wrong structure. This toolkit is built specifically to surface exactly those silent failures: duplicate keys are flagged by name and line rather than silently resolved, tab-indented lines are pointed out precisely rather than reinterpreted, and multi-document files (separated by ---) are handled explicitly rather than truncated to the first document without warning. Formatting re-serializes the parsed document while preserving comments, key order, anchors, and aliases — the things a naive text-based indentation fixer would destroy.
Use cases
- Cleaning up a Kubernetes manifest's indentation before applying it to a cluster
- Validating a GitHub Actions or GitLab CI workflow before pushing it
- Checking a Docker Compose file for syntax errors and duplicate keys
- Exploring a deeply nested application config as a collapsible tree instead of scrolling through raw text
- Converting a YAML config to JSON for use in a script or API call
- Authoring YAML from an existing JSON payload
- Catching tab-indentation errors before they cause a cryptic failure in a YAML-consuming tool downstream
- Confirming a multi-document YAML file (separated by ---) converts to the JSON array you expect
How to use the YAML Toolkit
- 1
Paste your YAML
Paste or type YAML into the input panel, or load one of the sample documents.
- 2
Choose an action
Click Format to clean up indentation, Validate to check syntax, Convert to JSON, or Compact for a single-line representation.
- 3
Explore the result
Switch between the YAML, Tree, JSON, and Statistics tabs to view the output, browse it structurally, or see key/node/depth counts.
- 4
Copy or download
Use the Copy button (or Ctrl/Cmd+Shift+C) or download the result as a file.