YAML to JSON Converter
Convert YAML (including multi-document files) into JSON using a safe loader that never runs custom tags.
Free, with no sign-up and no watermark. The file is processed in your browser and never uploaded.
Convert YAML — Kubernetes manifests, CI pipelines, Docker Compose files, OpenAPI specs — into JSON. Files with several documents separated by --- become a JSON array. The parser is a safe loader: custom tags that could run code are rejected rather than executed.
Step by step
- Paste or open YAML: .yaml and .yml files are accepted.
- Pick indentation: 2 spaces, 4 spaces or tabs for the JSON output.
- Fix errors: Indentation mistakes are reported with line and column, e.g. bad indentation of a mapping entry.
- Download: Save
data.jsonor copy it.
Handy for
Tooling
Feed YAML configs to tools or code that expect JSON.
Debugging indentation
Find exactly where YAML indentation goes wrong.
Comparing configs
Convert to JSON, then format with sorted keys to compare.
OpenAPI
Turn a YAML API spec into JSON.
Good to know
YAML treats
yes,no,onandoffas plain strings in YAML 1.2; quote values if you need them as strings in other tools.Anchors and aliases (
&and*) are expanded in the output; a file whose aliases would expand to millions of values is refused rather than freezing the page.
Questions
Is it safe to paste untrusted YAML?
Yes. Only standard YAML types are supported; tags such as !!js/function are refused, so nothing in the file can run.
Is my data sent anywhere?
No. Everything is processed by JavaScript in your browser tab — nothing you paste or open is uploaded, logged or stored on a server. You can even use the tool offline once the page has loaded.
Further reading
- Format and Convert JSON, Decode JWTs and Base64 Safely — Validate JSON with exact error positions, convert it to CSV, YAML or XML, and decode JWTs and Base64 in your browser without sending tokens to a server.
More Developer Tools tools
- JSON to YAML Converter — Turn JSON into clean YAML with configurable indentation, ready for config files and Kubernetes manifests.
- XML Formatter & Validator — Indent, minify and validate XML, with the exact line and column of any well-formedness error.
- SQL Formatter — Format SQL for MySQL, PostgreSQL, SQL Server, SQLite, BigQuery and more, with keyword case control.
- HTML, CSS & JavaScript Formatter — Beautify HTML, CSS, JavaScript, TypeScript and JSON with Prettier, running entirely in your browser.
- JavaScript, CSS & HTML Minifier — Minify JavaScript with Terser, CSS and HTML safely, and see exactly how many bytes you saved.
- Base64 Encoder & Decoder — Encode and decode Base64 for UTF-8 text and any file, including the URL-safe variant.