Skip to content
masterclass Buddy

Redis · Command

BITCOUNT

BITCOUNT returns the number of 1 bits in a Redis string. It can inspect the whole value or an inclusive range of bytes or bits.

Last updated

Since
2.6.0

Syntax

BITCOUNT key [start end [BYTE | BIT]]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • BITFIELD
  • BITFIELD_RO
  • BITOP
  • BITPOS
  • GETBIT
  • SETBIT

Source: BITCOUNT | Docs. Checked 2026-11-03.