---
title: "TOML Diff"
description: "Compare two TOML files by parsed value and list added, removed and changed key paths, such as dependencies.serde. Key order, whitespace and comments do not count. Runs in your browser."
url: https://findutils.com/developers/toml-diff/
category: developers
---

# TOML Diff

Compare two TOML files by parsed value and list added, removed and changed key paths, such as dependencies.serde. Key order, whitespace and comments do not count. Runs in your browser.

**Use this tool:** [TOML Diff](https://findutils.com/developers/toml-diff/)

## Programmatic access

- Browser-only: this tool works on a file, the DOM, or a browser API and has no REST or MCP id.

## Why Use TOML Diff?

A change to Cargo.toml, pyproject.toml or any other TOML config often looks bigger in a line diff than it is. A formatter reorders keys, a table moves, an inline table becomes a [section], and the real change, one version bump or one new dependency, is buried in the noise. TOML Diff parses both files and compares the values they hold, so it lists only the key paths that were added, removed or changed. Paste the before and after of a Dependabot pull request or a config change and read the answer as a short list of paths.

## Frequently Asked Questions

### How do I compare two TOML files?

Paste or drop the older file into Before (A) and the newer file into After (B), then press Compare. The page lists every key path that was added, removed or changed, with a count for each, and a single No differences message when the two files hold the same values.

### Does key order or formatting count as a change?

No. Both files are parsed first, so key order, whitespace, comments and the choice between a [table] header, dotted keys and an inline table make no difference. Only a different value, or a key that exists on one side only, is reported.

### How are arrays compared?

By position. Item 0 is compared with item 0, item 1 with item 1, and so on. Extra items at the end are reported as added or removed. Inserting or removing an item near the start of an array therefore shows the later items as changed, because they moved position.

### What does a path like dependencies.serde.features[1] mean?

It is the TOML key path to the value: the features array inside the serde table inside the dependencies table, at position 1 (counting from 0). Keys that are not bare TOML keys, for example ones containing a dot or a space, are shown in double quotes.

### Can I use it for Cargo.toml and pyproject.toml?

Yes. Any valid TOML file works, including Cargo.toml, pyproject.toml, Hugo and Netlify configs. Cargo.lock is TOML too, but it lists packages in an array, so a new package near the top shows many array positions as changed.

### What happens if one file is not valid TOML?

The comparison stops and the message names the side that failed, with the line and column the parser reported and its reason, for example a duplicate key or an unclosed string. Fix that line and the result updates.

### Does it merge the two files?

No. TOML Diff only compares. It lists the differences and leaves both files as they are.

### Are my TOML files uploaded?

No. Both files are parsed and compared in your browser, and the text is not sent in any request. Analytics and ads may load on the page as on the rest of the site. The page does not look anything up on crates.io, PyPI or any other package registry.

### Why does a whole table show as one added path?

When a table exists on one side only, it is reported once at its own path, with all of its keys as the value, instead of one line per key inside it. A table that exists on both sides is compared key by key.

## Related Tools

- [YAML TOML Converter](https://findutils.com/developers/yaml-toml-converter/)
- [JSON TOML Converter](https://findutils.com/developers/json-toml-converter/)
- [JSON Diff](https://findutils.com/developers/json-diff/)
- [Env Diff](https://findutils.com/developers/env-diff/)
- [YAML Validator](https://findutils.com/developers/yaml-validator/)
- [Diff Checker](https://findutils.com/text/diff-checker/)
