Keyspace Map Shows What a Redis or Valkey Keyspace Holds, From a Plain SCAN Key List
A key-value store has no tables and no schema to read. Everything sits in one flat list of keys, and the only structure is whatever people built into the names. After a few years and a few teams, the honest answer to “what’s in our Redis?” is often a shrug.
The Keyspace Map reads that structure back out of the names. Paste the output of redis-cli --scan or valkey-cli --scan, and a long key list becomes a short list of patterns with counts. In one test, 9,161 keys came down to 13 lines, led by user:<id>:profile with 3,000 keys, user:<id>:settings with 2,000 and session:<hex> with 1,500. The same keys show as a tree of prefixes you can open level by level, with how many bytes the key names take.

It runs in your browser and doesn’t send anything anywhere. The page’s security policy also stops it from fetching or loading anything from another site, so your key names stay on your machine.
How Patterns Come Out of Names
The map first works out the separator, usually :. Then it looks at each part of each key and folds the parts that vary into placeholders: <id> for numbers, <hex> for hashes, <uuid>, <date>, <email>, <ip>, and <token> for long random strings. A level holding hundreds of one-off names, such as user names, becomes <*>. Placeholders use angle brackets on purpose, since braces in a key mark a hash tag, and those are kept: cart:{<id>}:items.
Then it lists what’s worth a second look. Keys with no separator at all, which sit outside every prefix. Prefixes that differ only in case, like user and User. Prefixes one letter apart, like user and usr, which are usually a typo that shipped. Empty parts such as cache::home, keys longer than 256 bytes, and keys holding control characters or bytes that aren’t valid UTF-8.
Getting the Key List Safely
KEYS * is the command everyone tries first, and it walks the whole keyspace in one go while every other client waits. --scan walks it a slice at a time, so production keeps serving:
redis-cli -h 10.0.0.4 -p 6379 --scan > keys.txt
On a cluster, run it against each primary, since each one lists only its own keys. If keys can hold any byte, add --no-raw: the client then prints each key quoted, as in "bin:\x00\xff", and the map reads that form too. Raw output cuts a key off at its first zero byte.
Checked Against Real Servers
9,161 keys from 13 known patterns, with planted slips, went into Valkey 9.1.2 and Redis 8.10.2 and came back out through --scan, raw and quoted. On both servers the map found exactly the 13 patterns with the right counts, the three keys with no separator, the user and User pair, and the user and usr near miss. The count under each top-level prefix matched the servers’ own SCAN MATCH.
The map’s logic is one JavaScript file with no dependencies, open source under the Apache License 2.0, and it runs from the command line too:
redis-cli --scan | node keyspace/cli.js -
The manual and the tests are in the keyspace folder on GitHub.