Guide

THE TOOLBOX / DATA & DEVOPS UTILITIES

Translate YAML,
TOML, and JSON.

Convert Kubernetes manifests, Cargo.toml files, and JSON configs back and forth in real time with line-level syntax validation and zero server uploads.

Valid YAML converted to JSON.

Presets
Detected: YAML

189 / 500,000 UTF-16 code units · 189 UTF-8 bytes

100% client-side
Target Format
21 lines · 293 B

THE DETAILS

YAML 1.2, TOML v1.0, and JSON configuration translation explained.

1. Step-by-Step Workflow

Paste a YAML, TOML, or JSON configuration—or load one of the K8s YAML, Cargo.toml, or package.json presets. The engine auto-detects the input format and converts it into your chosen target tab (JSON, YAML, or TOML). Click Swap Input ↔ Output to reverse the direction or download the converted file.

2. YAML 1.2.2 vs. TOML v1.0.0 Standards

YAML 1.2 favors indentation-driven hierarchy ideal for deeply nested Kubernetes specs and GitHub Actions workflows. TOML v1.0 favors explicit [section] headers and key = value assignments used by Rust (Cargo.toml), Python (pyproject.toml), and Cloudflare Workers (wrangler.toml).

3. Line-Level Indentation & Structural Warnings

When a YAML or TOML file contains invalid syntax—such as tab indentation, unclosed quotes, or conflicting dotted paths—the validator pinpoints the exact 1-based line number. Any structural adjustments required by TOML (such as omitting null keys) are surfaced in a dedicated warning banner.

4. Private DevOps Workflows & Related Tools

Infrastructure manifests routinely contain internal cluster endpoints, container registries, and environment variables. All conversion runs inside your browser tab. Working with API specs or TypeScript models? Try the OpenAPI 3.1 validator, JSON formatter, and JSON to TypeScript generator.

Format Feature & CLI Comparison Matrix

Feature / ConstructYAML 1.2TOML v1.0JSON (RFC 8259)
CommentsSupported (# comment)Supported (# comment)Not allowed
Null valuesnull or ~Omitted (no null type)null
Array of objects- key: value[[table_array]][{"key": "value"}]
CLI equivalentyq -P config.jsontaplo fmt Cargo.tomljq '.' config.json

Common Configuration Pitfalls & Troubleshooting

Unquoted Colon in YAML Strings

A colon followed by a space (: ) inside an unquoted YAML value is interpreted as a nested mapping key. Wrap strings containing : or leading # characters in double quotes.

The YAML "Norway Problem"

Older YAML 1.1 parsers treated bare country codes like NO or words like on/off as booleans. Always quote two-letter country codes and version strings ("1.20") so they remain strings.

TOML Table Ordering

In TOML, any key-value pair placed after a [section] header belongs to that section until the next header appears. Place top-level root keys before the first [table] header.

Duplicate Keys in TOML Tables

Defining the same key twice within the same TOML table—or redefining a scalar key as a sub-table—is a syntax error. Use [[array_of_tables]] when repeating a section name.

Frequently Asked Questions

Are my Kubernetes manifests or environment configs uploaded anywhere?

No. All YAML 1.2, TOML v1.0, and JSON parsing, validation, and serialization execute 100% locally inside your browser. Zero configuration files, secrets, or internal hostnames ever leave your machine.

Why does TOML conversion omit null values or wrap root arrays?

The TOML specification requires a top-level key-value table and intentionally has no concept of a null scalar type. When converting a JSON or YAML root array to TOML, the converter wraps it under an items table and omits null keys with an explicit diagnostic warning.

How do I fix "Tabs are not allowed for indentation" in YAML?

Section 6.1 of the YAML 1.2 specification strictly forbids hard tab characters (\t) for block indentation because different editors expand tabs to different column widths. Replace leading tab characters with 2 or 4 spaces.

Can I sort configuration keys alphabetically across YAML, TOML, and JSON?

Yes. Check Sort keys A–Z in the input toolbar to recursively sort all mapping and table keys alphabetically before generating YAML, TOML, or JSON output.

What is the difference between TOML [table] and [[array.of.tables]]?

Single brackets [server] define a single nested object/mapping, whereas double brackets [[bin]] or [[servers]] append a new object element to an array under that key (equivalent to a YAML sequence of mappings).