Overview
Introduction
Sometimes you don't care about a YAML document's structure at all, you just want to see every actual piece of data it contains. This tool strips away every key and level of nesting and returns a flat list of just the values.
It's a quick way to scan a config for a specific value, count how often something repeats, or get a sense of what kind of data a document actually holds without tracing through its structure.
What Is YAML Value Extractor?
A YAML value extractor walks a parsed document and collects every leaf scalar it finds, skipping over mapping and sequence containers entirely, since those aren't values themselves, only the things that hold values.
The result is a flat, newline-separated list in document order, exactly as many entries as there are leaf values in the source YAML.
How YAML Value Extractor Works
The input is parsed with a full YAML 1.2 parser, then the resulting value is walked recursively. Mappings and sequences are descended into without being added to the output themselves; every scalar leaf they contain is converted to text and appended to the result list.
Strings are output as-is, numbers and booleans are converted with `String()`, and null is rendered as the literal text `null` to keep it distinguishable from an empty string.
When To Use YAML Value Extractor
Use it to quickly scan every value in a config for something specific, a hardcoded URL, a suspicious credential, an unexpected number.
It's also useful for a rough audit of a document's data, seeing every value in one list makes patterns (like repeated hardcoded values) easier to spot.
Often used alongside YAML Key Extractor, YAML String Extractor and YAML Number Extractor.
Features
Advantages
- Strips away structure entirely, letting you focus purely on the data.
- Preserves document order and doesn't deduplicate, so repetition remains visible.
- Handles arbitrarily nested mappings and sequences of any depth.
- Runs entirely client-side, so configuration values never leave your browser.
Limitations
- The output has no key or path information attached to each value; pair with Extract Keys from YAML or use Flatten YAML if you need both together.
- Multi-line string values are inserted into the list as-is, so a value containing embedded newlines will visually span multiple lines of output despite counting as one entry.
- Very large documents produce very long lists with no built-in filtering.
Examples
Best Practices & Notes
Best Practices
- Search the extracted list for a specific value when you're not sure which key it's stored under.
- Use alongside Extract Keys from YAML when you need to reconnect a value back to its location in the document.
- Pair with Extract Strings or Extract Numbers from YAML when you only care about one particular value type.
Developer Notes
The collection walk mirrors this site's JSON Value Extractor exactly, adapted to parse through `parseYaml` instead of `JSON.parse`. Values are stringified inline during the walk (`String(value)` for numbers/booleans, direct passthrough for strings, `"null"` for null) rather than collected as typed values and formatted afterward, keeping the implementation a single pass.
YAML Value Extractor Use Cases
- Scanning a config for a specific hardcoded value or credential
- Auditing a document for repeated values that might belong in a shared variable instead
- Getting a quick sense of what kind of data a large YAML file actually contains
- Feeding extracted values into another tool or script that doesn't need the surrounding structure
Common Mistakes
- Expecting values to be deduplicated, they aren't; a value appearing five times in the source appears five times in the output.
- Assuming the output tells you which key each value came from, it doesn't; use Extract Keys from YAML for that.
- Overlooking that a multiline string value produces multiple lines in the output despite being a single logical entry.
Tips
- Use this together with Extract Yaml Keys, run both and cross-reference by position when you need key/value pairs but want to review them separately.
- For a combined key=value view instead of two separate lists, try Flatten YAML instead.
- Filter the output externally (grep, search) for a suspected value when auditing a large config for something specific.