YAML / JSON / TOML Converter
Convert between YAML, JSON and TOML in any direction — instantly, in your browser. Paste your config, pick input and output formats, and get clean converted output. Great for Kubernetes, Terraform, Docker Compose and CI/CD config migrations.
| Feature | YAML | JSON | TOML |
|---|---|---|---|
| Comments | ✓ # hash | ✗ | ✓ # hash |
| Human readable | ✓✓ Very | ✓ Moderate | ✓✓ Very |
| Common use | K8s, Docker, CI/CD | APIs, configs, web | Rust, Hugo, Cargo |
| Spec | YAML 1.2 | RFC 8259 | TOML v1.0 |
What is the YAML / JSON / TOML Converter?
The YAML / JSON / TOML Converter is a browser-based tool that translates configuration files between the three most common data serialization formats used in DevOps and software engineering. Whether you need to convert a Kubernetes YAML manifest into JSON for an API call, migrate a TOML configuration to YAML for a CI/CD pipeline, or inspect a JSON response as YAML, this tool handles all six conversion directions instantly without sending any data to a server.
Configuration format mismatches are one of the most common sources of friction in modern DevOps workflows. Teams frequently encounter situations where a tool generates output in one format while the downstream system only accepts another. Having a reliable, type-preserving converter eliminates manual transcription errors and speeds up config migrations significantly.
When to Use This Tool
- Kubernetes to REST API: Convert a YAML Deployment manifest to JSON when posting directly to the Kubernetes API via curl or Postman.
- Terraform variable migration: Translate JSON variable files to YAML when moving to a tool that prefers YAML-based configuration management.
- Rust project setup: Convert an existing JSON or YAML config to TOML format for Cargo.toml or other Rust-ecosystem tools that expect TOML input.
- Documentation and code review: Paste YAML from a runbook into the tool to view it as JSON for easier comparison against API schema documentation.
How It Works
The converter parses the input using a format-specific parser — a custom YAML parser handles common Kubernetes and CI/CD YAML patterns, while TOML is parsed with support for sections, array-of-tables, and basic scalar types. Once the input is parsed into an internal JavaScript object, the tool serializes it to the target format using either the native JSON.stringify() function for JSON, a custom YAML serializer, or a TOML serializer. Key sorting and pretty-print options are applied at the serialization stage, so they work consistently across all format combinations.
Frequently Asked Questions
What formats does this converter support?
The converter handles YAML, JSON, and TOML in any direction — YAML to JSON, JSON to TOML, TOML to YAML, and the three reverse directions as well. All six conversions are supported. It also provides pretty printing with configurable indentation and an optional key-sorting feature, which is useful for producing deterministic output when comparing configs across environments or storing them in version control.
Why would I need to convert between YAML and JSON?
Many DevOps tools use different configuration formats even when they describe the same underlying infrastructure. Kubernetes uses YAML, most REST APIs speak JSON, npm package.json is JSON, and GitHub Actions workflows are YAML. Converting between them is a routine task when migrating configurations, copying snippets from documentation written in a different format, or debugging API payloads that came back as JSON but need to be compared against a YAML source of truth. Having a browser-based tool avoids the need to install language-specific libraries like PyYAML or js-yaml just to perform a one-off conversion.
Are there limitations when converting TOML to YAML or JSON?
TOML supports native datetime types and distinguishes between integers and floats more strictly than YAML or JSON do. When converting TOML that contains datetime values, those values are treated as strings in the output because neither YAML nor JSON has a universally agreed-upon datetime literal syntax. Complex TOML structures using array-of-tables ([[section]]) will be converted to arrays of objects, which is semantically correct but may look different from what you expected. Simple key-value TOML configs — the most common case for application settings and Cargo.toml files — convert cleanly to both YAML and JSON with no data loss.