Back

YAML/TOML structured comparison

Formatters

Loading

Loading tool

The tool is loaded only when you open it.

All processing for this tool happens in your browser. Your input is not sent to a server.

About this tool

Paste two configuration documents, independently choose YAML or TOML, and compare their normalized types and values in a disposable local worker. Integer 1 differs from float 1.0 and string "1". Map key order and comments are ignored; sequences compare by index. This tool does not convert or rewrite your source.

Common uses

  • Review configuration changes without treating key order as a change.
  • Compare YAML and TOML while exposing type differences that plain JSON can hide.
  • Inspect local dates and UTC instants before sharing a complete typed report.

How to use it

  1. 1.Paste left and right documents, then select each format. Use a type or date sample to inspect the rules.
  2. 2.Run comparison. Review JSON Pointer locations, change kinds and types; switch pages for larger results.
  3. 3.Review sensitive values before downloading the complete normalized trees and differences. Edits invalidate old reports.

Executable comparison examples

Integer versus float

Left (yaml): n: 1
Right (toml): n=1.0
/n: type integer -> float

The equal numeric magnitude does not erase the integer/float distinction.

Equal instants with different offsets

Left (toml): x=2026-10-10T12:30:00+08:00
Right (toml): x=2026-10-10T04:30:00Z
equal

Both offsets describe the same instant, so no difference is reported.

Date versus text

Left (yaml): day: 2026-10-10
Right (toml): day=2026-10-10
/day: type string -> localDate

YAML core treats an untagged date as text; TOML has a local-date type.

Escaped path and Unicode

Left (yaml): "a/b~c": 日本語 · 中文 · 𠮷
Right (toml): "a/b~c"="changed"
/a~1b~0c: value string -> string

Slash and tilde are escaped in JSON Pointer; Unicode values are preserved.

Limits and notes

  • YAML uses one YAML 1.2 core document, string mapping keys and explicit !!str, !!null, !!bool, !!int, !!float, !!map and !!seq tags. Aliases, merge key <<, YAML 1.1 directives, complex/non-string keys and custom or timestamp/binary/set tags are rejected with diagnostics. Unused anchors are allowed; aliases are never expanded.
  • TOML 1.1 supports tables, dotted keys, inline tables, arrays of tables, multiline strings and four date/time types. Integers are signed 64-bit BigInt values. Floats use JavaScript binary64 and may round; NaN, infinities and negative zero retain lexical values.
  • Offset date-times compare as UTC instants; original offsets are not retained. Local dates, times and date-times keep their distinct types and have no assumed timezone. Temporal validates calendar dates and keeps up to 9 fractional-second digits; inputs with more than 9 fractional-second digits are rejected. Leap-second values with :60 are rejected to avoid normalization to :59. YAML core dates remain strings; !!timestamp is unsupported.
  • Each input is capped at UTF-8 128 KiB / UTF-16 131,072 units, depth 64 and 10,000 nodes. Up to 2,000 differences and 2,000,000 UTF-8 bytes of complete JSON are accepted. A disposable worker ends after 8 seconds. Limit failures return no partial report.
  • Maps sort keys without Unicode normalization; sequences compare positionally, not with move detection. Added/removed/type-changed containers produce a single summary, with complete values in the two exported typed trees. JSON Pointer paths escape ~ and /. Preview is 1,024 UTF-16 units and 100 differences per page. Input, format and language edits, swaps and cancellation invalidate exports. Processing is local with no input persistence, constructors, remote references, resource loading or input HTML rendering. JSON contains complete normalized values and may include credentials; it does not preserve comments, source bytes, number spellings or original date offsets.

Frequently asked questions

Why is 1 different from 1.0?

Integer and float are distinct structured types. Numbers are exported as typed strings so large integers and special floats survive JSON.

Can YAML aliases or custom tags run code?

No custom constructors are installed. Alias nodes are rejected before conversion or expansion; unsupported tag names and their paths are shown.

Why is a YAML date different from a TOML date?

YAML 1.2 core resolves an untagged date as a string. TOML defines local date, local time, local date-time and offset date-time separately.

Does JSON include the clipped values?

Yes, a successful report includes both complete typed trees and all accepted differences. A limit failure provides no partial download.

Related tools