TOML → YAML

About the TOML ↔ YAML playground

This tool converts between TOML and YAML, two human-friendly configuration formats. TOML (Tom's Obvious Minimal Language) uses explicit key/value pairs and bracketed tables, and is the format behind Cargo, pyproject.toml, and many Rust and Python projects. YAML uses significant indentation to express the same nested maps and lists more compactly. The converter parses one format into an in-memory data model and serializes it to the other, preserving structure, types, and nesting.

Everything runs locally in your browser using JavaScript parsers, so your configuration never leaves your machine and nothing is uploaded to a server. This makes it safe for secrets-bearing config files. Paste TOML to get equivalent YAML or paste YAML to get equivalent TOML, then copy the result. It is handy when migrating a project's config style, reading an unfamiliar format, or producing YAML for a CI system from existing TOML settings.

HostedTOML ↔ YAML runtime
mainentry file
single fileworkspace
stdinprogram input

How it works

1

Write

The main file is the entry point for each run.

2

Give it input

Use the Input panel to pipe standard input to your program when it needs data.

3

Run

Run sends your code to a fresh hosted runtime and streams the result into the output panel.

4

Keep or share

Your draft stays in this browser, and Share creates a separate snapshot link.

External resources

  • toml.io— Official website
  • GitHub— Official spec repository

Input (TOML)

title = "Example"
[owner]
name = "Alice"
active = true
[database]
ports = [8000, 8001]

Output (YAML)

title: Example
owner:
  name: Alice
  active: true
database:
  ports:
    - 8000
    - 8001

Input (TOML array of tables)

[[servers]]
name = "alpha"
ip = "10.0.0.1"

[[servers]]
name = "beta"
ip = "10.0.0.2"

Output (YAML)

servers:
  - name: alpha
    ip: 10.0.0.1
  - name: beta
    ip: 10.0.0.2

Input (TOML typed values)

count = 42
ratio = 3.14
enabled = false
label = "v1.0"

Output (YAML)

count: 42
ratio: 3.14
enabled: false
label: v1.0

Input (TOML nested table)

[package]
name = "app"
version = "1.2.0"

[package.metadata]
license = "MIT"

Output (YAML)

package:
  name: app
  version: 1.2.0
  metadata:
    license: MIT

Input (TOML inline table)

point = { x = 1, y = 2 }
tags = ["a", "b"]

Output (YAML)

point:
  x: 1
  y: 2
tags:
  - a
  - b

Input (TOML date-time)

[build]
started = 1979-05-27T07:32:00Z
retries = 3

Output (YAML)

build:
  started: 1979-05-27T07:32:00Z
  retries: 3

How it works

The editor uses Monaco, the engine behind VS Code, with language-aware editing tools and familiar keyboard controls.

Two-way workflow

Paste TOML to get YAML, or paste YAML to get equivalent TOML.

One format is parsed to a data model, then serialized to the other.

Structure preserved

Bracketed [tables] and key/value pairs map to YAML nested maps.

Lists and nesting carry across in both directions.

Value types are kept intact through the conversion.

Privacy

JavaScript parsers run in-browser, so config never leaves your machine.

Safe for secrets-bearing files like pyproject.toml or Cargo.toml.

Tips

Migrate a project's config style without rewriting by hand.

Produce YAML for a CI system from existing TOML settings.

Every shortcut, searchable:

Editing

Undo
Ctrl+Z
Redo
Ctrl+⇧+Z
Select next occurrence
Ctrl+D
Delete line
Ctrl+⇧+K
Move line up / down
Alt+↑ / ↓
Copy line up / down
Alt+⇧+↑ / ↓
Toggle comment
Ctrl+/
Indent line
Ctrl+]
Outdent line
Ctrl+[

Navigation

Find
Ctrl+F
Find & replace
Ctrl+H
Go to line
Ctrl+G
Go to symbol
Ctrl+⇧+O

Selection

Select all
Ctrl+A
Select line
Ctrl+L
Select all occurrences
Ctrl+⇧+L
Shortcuts follow your OS — ⌘ becomes Ctrl on Windows and Linux.
It converts configuration between TOML and YAML in both directions, parsing one format and re-serializing it as the other while preserving keys, nesting, arrays, and scalar types.
No. Parsing and conversion happen entirely in your browser with JavaScript. Your config text is never sent to any server, so it is safe for files containing secrets.
Yes, it is completely free to use with no sign-up, no limits, and no installation required.
Paste either format into the input. The tool detects or lets you choose the source format and produces the opposite, so TOML in yields YAML and YAML in yields TOML.
Generally no. Both parsers map content to a data model that drops comments, so the converted output contains the data and structure but not the original inline comments.
ini
yaml

Output

YAML output

>_compilebytes

A fast place to write code and run it in isolated hosted runtimes. Free, forever.

Playgrounds

Python compilerC compilerJavaScript compilerC++ compilerTypeScript compilerGo compilerJava compilerRust compiler
All playgrounds →

Tools

JSON formatterRegex testerBase64 encoderJWT decoder
JSON formatterBase64 encoder & decoderRegex testerJWT decoder
All tools →

Company

TermsPrivacy[email protected]
© 2026 compilebytes115 runtimes · no signup115 runtimes · isolated sandboxes · no signup