> yaml | toml | config <

// Convert, transform, and port configuration files between YAML and TOML in either direction

[BIDI]

Two-Way Conversion

Convert YAML to TOML or transform TOML to YAML with a single click. The Swap button flips direction and reuses the previous output as new input.

[VALID]

Line-Numbered Errors

Parse errors are surfaced immediately with the line number where parsing failed so you can locate invalid input without guessing.

[FREE]

Client-Side Only

Powered by js-yaml and @iarna/toml in your browser. No upload, browser-based, configuration data never touches a server.

// ABOUT YAML AND TOML

How Conversion Works:

The tool parses the source format into a JavaScript object using js-yaml (compliant with the YAML 1.2 spec) or @iarna/toml (compliant with the TOML v1.0.0 spec), then serializes that object into the target format. TOML requires a top-level table, so the YAML root must be a mapping (not a list or scalar) when porting to TOML.

Example:

YAML: name: foo => TOML: name = "foo"

Common Use Cases:

  • >Migrating Python projects from setup.cfg to pyproject.toml
  • >Switching between Hugo (TOML) and Jekyll (YAML) site configs
  • >Comparing Cargo (TOML) and GitHub Actions (YAML) syntax
  • >Auditing CI/CD configs in either format
  • >Translating Kubernetes manifests for tools that prefer TOML

>> frequently asked questions

Q: Does this preserve comments?

A: No. Both parsers operate on data values per their respective specs (YAML 1.2 and TOML 1.0.0), so source-level comments are not carried into the in-memory tree and cannot be re-emitted. If you need to preserve commentary, copy or restore the comments manually after conversion. Round-trippers that retain comments require dedicated AST-aware libraries beyond the scope of a quick-convert tool.

Q: Why does my YAML fail to convert?

A: TOML v1.0.0 requires the document root to be a table (object). If your YAML root is a sequence, scalar, or null, it cannot be expressed as TOML directly. Wrap the value in a top-level key first (for example, items: [...]). The error panel includes the parser line number when js-yaml or @iarna/toml provides it, making it straightforward to locate the offending construct.

Q: What versions of YAML and TOML are supported?

A: This tool uses js-yaml 4.x which targets YAML 1.2, and @iarna/toml 2.x which implements the TOML v1.0.0 specification. Most real-world config files written for Hugo, Cargo, pyproject, or Jekyll parse without issue. Exotic YAML 1.1 boolean coercion (yes/no/on/off as booleans) is intentionally not applied because it changed in YAML 1.2.

Q: Are dates and timestamps preserved?

A: Yes. ISO 8601 dates parsed by either format are re-serialized in the target format's native date syntax when possible. TOML supports offset date-time, local date-time, local date, and local time as first-class types per TOML 1.0.0; YAML 1.2 represents these as ISO 8601 strings or native timestamps depending on the loader configuration.

Q: Is my config uploaded?

A: No, this converter is fully browser-based and 100% client-side. Both js-yaml and @iarna/toml run inside your browser tab from a CDN bundle. Your configuration data stays on your machine, is not logged, and is not transmitted to any server. The page works offline once it has loaded the parser libraries, so you can paste sensitive config safely.

// OTHER LANGUAGES