⚡ Data Formats

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.

Input Format
Output Format
📖 How to Use This Tool
1
Select input format (YAML, JSON or TOML) and output format
2
Paste your config into the input panel
3
Output updates instantly — toggle Pretty print and Sort keys
4
Click Swap ⇄ to reverse input/output or Download to save
📝 Examples
YAML → JSON
Input: apiVersion: apps/v1 kind: Deployment
Output: {"apiVersion": "apps/v1", "kind": "Deployment"}
JSON → TOML
Input: {"name": "my-app", "port": 3000}
Output: name = "my-app" port = 3000
📝 Input YAML
✨ Output JSON
⚡ Quick Conversions
YAML → JSON JSON → YAML TOML → YAML YAML → TOML JSON → TOML TOML → JSON
📋 Format Comparison
Feature YAML JSON TOML
Comments✓ # hash✓ # hash
Human readable✓✓ Very✓ Moderate✓✓ Very
Common useK8s, Docker, CI/CDAPIs, configs, webRust, Hugo, Cargo
SpecYAML 1.2RFC 8259TOML v1.0
Note on TOML: TOML supports some data types that don't map cleanly to JSON/YAML (e.g. datetime, integers vs floats). Complex nested TOML with array-of-tables may require manual review after conversion.

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

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.