YAML Path Query

Point at YAML with paths like server.host, items[0].name or ['key with spaces']; query, set or delete values locally while preserving comments when safe.

Try:
Result

Query and edit YAML by path in your browser

Paste a YAML document, enter a path such as server.host, items[0].name or ['key with spaces'], and choose whether to query, set or delete that value. The tool runs locally in your browser and uses the same pure-Rust core as the CLI and chat block.

Worked example

Input YAML:

server:
  host: localhost   # bind address
  port: 8080
items:
  - name: alpha
    qty: 1

Path syntax

Modes and output

Limits and edge cases

The input must contain one YAML document. Multi-document streams separated by --- are rejected so the target document is never guessed. Simple scalar edits, new keys in an existing block mapping and block item deletes are spliced into the original source and then re-parsed to verify the result, preserving comments, blank lines, key order, quoting style and indentation. More complex edits, such as creating missing intermediate levels or replacing block scalars, fall back to re-emitting the parsed tree; that keeps the data correct but normalizes formatting and drops comments. YAML anchors resolve during query, but anchor syntax is not preserved when an edit needs the normalized fallback.

FAQ

Is this JSONPath for YAML?

No. It accepts familiar dot and bracket paths, but it is not RFC 9535 JSONPath. There are no wildcards, filters, slices or recursive descent operators. The goal is a predictable single-node path for quick YAML reads and edits.

Will comments and formatting survive edits?

Often, yes. Existing scalar replacements, simple new keys and block deletes are applied as verified text splices. If a safe splice is not possible, the tool falls back to re-emitting the YAML from the parsed data tree, which is correct but may drop comments and normalize formatting.

How do I address a key that contains a dot?

Use a quoted bracket segment. For example, if the YAML has a key named my.key, use ["my.key"] rather than my.key, because the latter means the key my followed by the key key.

Why did setting a value change its type?

Set values are parsed as YAML on purpose. 8080 becomes a number, true a boolean and [a, b] a list. To force a string, quote the value in the value field, for example "8080".

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool yaml-path-query "server:
  host: localhost   # bind address
  port: 8080
items:
  - name: alpha
    qty: 1" 'path=server.host'

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/yaml-path-query/?yaml=server%3A%0A%20%20host%3A%20localhost%20%20%20%23%20bind%20address%0A%20%20port%3A%208080%0Aitems%3A%0A%20%20-%20name%3A%20alpha%0A%20%20%20%20qty%3A%201&path=server.host&mode=query&value=9090&format=yaml

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.