T tomlkit·org
Inspect Formatter Validator Lint Stats Keys Query Convert TOMLJSON JSONTOML TOMLYAML YAMLTOML INITOML TOMLINI .envTOML TOML.env TOMLTS TOMLCSV CSVTOML TOMLXML TOML.properties .propertiesTOML Transform Sort keys Flatten Unflatten Redact Minify Generate Go struct Rust struct Python types JSON Schema Compare Diff Merge

TOML Query

updated 20 August 2026

Give it a dotted path — package.name, tool.poetry.dependencies, servers.0.ip — and it returns just that slice of the document, as TOML or as JSON. It is the fastest way to answer "what is this key actually set to?" without scrolling a 900-line config.

dot paths, numeric array indexes

What this tool does

It parses the whole TOML document, walks the dotted path you type, and prints whatever sits at the end of it. A scalar comes back as a bare value. A table comes back as a valid TOML fragment you can paste elsewhere. An array of tables comes back as the array. Switch Output to JSON when the value is going into a script instead of another config.

The intent it closes: "I know the key exists somewhere in this file — just show me its value." Typical paths look like project.version in a pyproject.toml, dependencies.serde in a Cargo.toml, or servers.0.ip to reach the first entry of a [[servers]] array.

It reads; it never writes. Nothing about your document changes, and no path can modify a value. If you want the full list of paths rather than one value, the Key Lister prints every path in the file.

When you'd reach for it

  • Check one setting in a long config. Type the path instead of scrolling — the answer lands in the right pane immediately.
  • Copy a whole section out. Point at a table (tool.poetry) and the result is a valid standalone TOML fragment, ready to paste into another file.
  • Reach into an array of tables. Numeric segments index arrays: servers.0 is the first [[servers]] entry, servers.1.ip its neighbour's address.
  • Feed a value to a script. Switch Output to JSON and the result is machine-readable — handy when the next step is a jq-style pipeline.
  • Prove a key is missing. A path that does not resolve reports exactly which segment it stopped at, which is faster than eyeballing indentation.

How it works

One pass, three steps, entirely in the page.

1. Parse the document

The input goes through the same TOML 1.0 parser the validator uses, so dotted keys collapse into nested tables and [[array]] blocks become real arrays before any lookup happens. An invalid document errors here and no query runs.

2. Walk the path

The path is split on dots and followed one segment at a time. A segment that is all digits indexes into an array; anything else is treated as a table key. If a segment cannot be resolved the status bar names it — Path 'a.b.c' not found (stopped at 'b') — so you know how far the lookup got.

3. Emit the result

A table is re-emitted as canonical TOML. A scalar is printed as a TOML value (strings keep their quotes so the type stays visible). With Output set to JSON, dates are serialised as ISO-8601 strings and the whole result is pretty-printed with two-space indentation.

Options reference

Path

A dot-separated path from the root of the document. Table keys are matched literally, numeric segments index arrays, and the two can mix freely: tool.poetry.dependencies, servers.1.name. Leave off a trailing segment to get the whole table instead of one key.

Output

TOML keeps the result in the same language as the input — a table stays a table with its section headers. JSON converts it, turning TOML datetimes into ISO-8601 strings, which is what you want if the value is about to be parsed by a script.

Example

Input, with the path set to tool.poetry.dependencies:

[project]
name = "demo"

[tool.poetry.dependencies]
python = "^3.12"
httpx = "^0.27"

Output:

python = "^3.12"
httpx = "^0.27"

Set the path to tool.poetry.dependencies.httpx instead and the output narrows to "^0.27". Switch Output to JSON and the same query returns { "python": "^3.12", "httpx": "^0.27" }.

FAQ

Does it support jq syntax?

No — it takes plain dotted paths, not a query language. There are no filters, pipes, or wildcards: one path, one result. That covers the common case (read this key) without the learning curve. For anything more complex, convert to JSON with the TOML to JSON tool and pipe it through jq.

How do I reach an item inside an array of tables?

Use its index as a path segment. servers.0 gives you the first [[servers]] block, servers.2.region the region of the third. Indexes are zero-based.

What happens if the path does not exist?

The status bar turns red and names the segment where the walk stopped, so you can see whether you mistyped the leaf or the parent table. The output pane is left empty rather than showing a stale result.

Can it change a value?

No. This tool only reads. To edit a document, use the Formatter for re-styling, Merge to apply an overlay of new values, or Redact to mask secrets.

Is my config uploaded?

Never. Parsing and lookup both happen in your browser, so a file full of production credentials is safe here — you can even disconnect from the network first.