// text

Extract YAML Values.

Output a list of leaf values with their paths, or unique deduplicated values for inspection.

Client-sideDeduplicatedNo upload

YAML input

Values

Extracting YAML values.

This tool recursively walks your YAML document and extracts every leaf value — strings, numbers, booleans, and nulls. The output is one value per line, deduplicated so repeated values appear only once. This gives you a quick view of what data your YAML actually contains.

Duplicate values are removed because the same string, number, or boolean may appear at multiple key paths. Deduplication is based on the value itself, not its type — the number 42 and the string "42" are treated as different values.

Use cases.

Data auditing. Quickly scan all values in a large YAML file to check for hardcoded secrets, placeholder values (TODO, CHANGE ME), or incorrect data. The deduplicated list makes it easy to spot anomalies.

Translation. When internationalizing a YAML config, extract all string values to see what needs translation. Numbers and booleans don't need translation, but the deduplicated string list gives you a complete catalog.

Search and replace. Before doing a find-and-replace across a large YAML file, extract values to verify the replacement won't affect unintended strings. The deduplicated list is shorter and easier to review.

Output format.

Values are output as their raw form without quoting: strings as plain text, numbers as digits, booleans as true/false, and nulls as null. Empty strings appear as blank lines. The list is sorted by first occurrence in the document.

For a list of key paths instead of values, use the "Extract keys" tool. For a structured view of both keys and values, use the "YAML statistics" tool.

Advanced use cases.

Security auditing. Scan extracted values for potential secrets, API keys, or tokens that should not be hardcoded. The deduplicated list makes it easy to spot patterns like base64 strings, long hex values, or email addresses that may indicate sensitive data stored in configuration files.

Dependency checking. When YAML files contain version numbers, package names, or URL endpoints, extracting all values gives you a quick inventory. Compare this list against known vulnerable versions or deprecated endpoints to catch issues before deployment.

Data migration planning. Before migrating data between systems, extract values from source YAML to understand what you are working with. This helps identify data types, count unique values, and spot any unexpected content that might cause issues during migration.

Working with the output.

The extracted values can be copied to your clipboard and used in other tools. Paste into a text editor to search through values, into a spreadsheet for analysis, or into a script for automated processing. The one-value-per-line format makes it easy to pipe through command-line tools like sort, uniq, or wc.

For large YAML documents, the extracted value list provides a compact summary that is much easier to scan than the full document. This is especially useful when reviewing configuration files generated by tools or when auditing YAML exports from CI/CD pipelines and infrastructure-as-code repositories.

Remember that this tool extracts leaf values only — keys, structure, and nesting information are discarded. If you need to preserve the relationship between keys and values, consider the "YAML to JSON" or "YAML statistics" tools instead.

FAQ

How do I extract all values for a specific key across a YAML array?

`yq '.[] | .name' file.yaml` extracts the `name` field from each item; add `-r` for raw output without quotes.

How can I get just the values from a YAML key:value map?

`yq '. | values' file.yaml` returns all top-level values; `yq '... | select(has("key")) | .key'` recursively finds all values for `key`.

How do I extract a YAML value and use it as a shell variable?

`VAL=$(yq '.my.key' file.yaml)` then `echo "$VAL"`; with export: `export DB_HOST=$(yq -r '.database.host' config.yaml)`.

How do I extract nested values from deeply nested YAML?

Use dot paths: `yq '.spec.template.spec.containers[0].image' deployment.yaml` — useful for getting the image tag from a k8s manifest.

Can I extract values matching a condition from YAML?

Yes — `yq '.items[] | select(.status == "active") | .id' data.yaml` returns IDs of all active items in one command.