You can use the bech32 binary in the same way:
echo stake1uyuqtqq84v9jrqm0asptaehtw7srrr7cnwuxyqz38a6e8scm6lcf3 | ./bech32
returning: e138058007ab0b21836fec02bee6eb77a0318fd89bb86200513f7593c3
which is the stake key if you remove the e1 at the beginning.
If it’s a registered stake key, you could also look it up in the “stake_address” table in db-sync, just remove the “\xe1” part at the beginning of the hash_raw value.
PS. To convert in the other direction, run
echo e138058007ab0b21836fec02bee6eb77a0318fd89bb86200513f7593c3 | ./bech32 stake
and for addresses:
echo 01adbe254800a1ba6646dabbb1bb80887187ab0ed2d6b4410047532aeadf8591494b896913514dc784a71f666e9d119a7f5a040c780c614456 | ./bech32 addr