It is very common to unvoice consonant sounds appearing last in a word.

* die Hand -- /hant/ -- d → /t/
* der Tag -- /taːk/ -- g → /k/
* der Staub -- /ʃtaʊp/ -- b → /p/

This sometimes happens with consonant sounds at the end of a syllable that does not end the word, but not always. 

* die Handlung -- /handlʊŋ/ -- d → /d/
* der Handschuh -- /hantʃuː/ -- d → /t/
* agieren -- /aɡiːʀən/ -- g → /g/
* der Tagfalter -- /taːkfaltɐ/ -- g → /k/
* das Objekt -- /ɔpjɛkt/ -- b → /p/
* obligatorisch -- /ɔbliɡatoːʀɪʃ/ -- b → /b/

When are consonant sounds at the end of a coda unvoiced?