Redis › Strings & Bitmaps in Redis
What are Redis bitmaps, and how do they let you efficiently work with individual bits within a string?
IntermediateAnswer
A Redis bitmap is not actually a separate data type but rather a way of treating a regular string as a sequence of individual bits, letting you use commands like SETBIT and GETBIT to set or read a specific bit's value, which is extremely memory efficient for tracking simple binary states, such as whether a specific user was active on a specific day.
SETBIT user_active:2026-09-07 1001 1
GETBIT user_active:2026-09-07 1001Real-world example A user activity tracking system sets a single bit for each user who was active on a specific day, using an extremely compact bitmap representation instead of a much larger data structure to track the same information.