Overview
Introduction
When you're reviewing a config for typos, hardcoded values, or text that should be internationalized, the numbers and booleans mixed in just add noise. This tool filters a YAML document down to only its string values, letting you focus on the text that actually needs a human read.
It's the string-only counterpart to Extract Values from YAML, useful whenever type matters to what you're looking for.
What Is YAML String Extractor?
A YAML string extractor walks a parsed document and collects every leaf value whose resolved type is `string`, skipping numbers, booleans, and nulls entirely.
The result is a flat, newline-separated list of just the text content in the document, in the order it appears.
How YAML String Extractor Works
The input is parsed with a full YAML 1.2 parser, which resolves each plain scalar to its actual type according to YAML's core schema (so `true` becomes a boolean, `42` becomes a number, and `hello` or `"42"` stay strings). The resulting value is walked recursively, and only leaves that are JavaScript strings after parsing are added to the output.
Because the filtering happens on the resolved type, not the raw source text, quoting a value is exactly what determines whether an ambiguous-looking scalar (like `"true"` or `"3"`) is included as a string.
When To Use YAML String Extractor
Use it to scan a large config for typos or awkward phrasing in string fields without wading through numeric settings.
It's also useful for pulling out user-facing text (labels, descriptions, messages) from a config as a starting point for translation or copy review.
Often used alongside YAML Value Extractor, YAML Number Extractor and YAML Key Extractor.
Features
Advantages
- Filters by resolved type, so quoting decisions in the source YAML are respected exactly.
- Cuts through numeric and boolean noise to surface just the text worth a human read.
- Handles arbitrarily nested mappings and sequences of any depth.
- Runs entirely client-side, so configuration text never leaves your browser.
Limitations
- The output has no key or path information; pair with Extract Keys from YAML if you need to know where each string came from.
- Multiline string values appear as multiple lines of output despite being one logical entry.
- Values that look like text but were parsed as another type (an unquoted `yes`/`no` resolving to boolean) are excluded, matching YAML's own type resolution, not necessarily what a human would expect at a glance.
Examples
Best Practices & Notes
Best Practices
- Use this before a copy review or translation pass to get a clean list of exactly the text that matters.
- Cross-check against Extract Yaml Values if you're unsure why a value you expected didn't appear, it may have resolved to a non-string type.
- Combine with a text search over the output to spot hardcoded strings that should probably be config variables.
Developer Notes
This is a straightforward type-filtered variant of the site's general value extractor: the same recursive walk, but the collection step only pushes a value onto the output when `typeof value === "string"`. Type resolution itself is entirely delegated to the `yaml` package's parser, this tool does no additional type-guessing of its own.
YAML String Extractor Use Cases
- Reviewing every text value in a config for typos or unclear phrasing
- Extracting user-facing strings from a config as a starting point for translation
- Auditing for hardcoded strings (like URLs or messages) that should be shared variables
- Getting a quick text-only summary of a config's content without the numeric noise
Common Mistakes
- Expecting quoted numeric strings to be excluded, they're included, since they resolved to the string type, exactly matching what the YAML author quoted them as.
- Assuming unquoted `yes`/`no`/`on`/`off` values appear here, YAML's core schema resolves many of those to booleans, so they're filtered out, not treated as strings.
- Forgetting that this tool strips all context; cross-reference with Extract Keys from YAML if you need to know where a given string lives.
Tips
- If a string you expected is missing, check Extract Yaml Values to see what type it actually resolved to.
- Use alongside Extract Numbers from YAML when auditing a config's two most common value types separately.
- For quoted values you want to force to stay strings, review Change Quotes to Double/Single Quotes tools to standardize quoting style first.