Stray dogs are inevitably exposed to more infections than owned dogs living indoor. However, no studies have investigated whether the immune system gene expression differs between owned dogs kept in better care conditions and stray dogs living outside. To investigate this, blood samples were taken from 90 dogs (45 owned and 45 stray dogs) that were checked and confirmed as healthy. By using qPCR, the amples were analyzed for the expression of the perforin, granzyme A and granzyme B genes, which are associated with the activation of apoptotic pathways in the immune system. We found that the perforin and granzyme A gene expression levels were higher in stray dogs although the differences were not statistically significant. On the other hand, a 2.81 times higher and a notable difference (P < 0.001) was found in the expression level of granzyme B gene in stray dogs. These results indicate that the immune system in stray dogs might be more prepared for diseases than that of the owned dogs and the granzyme B gene plays a more dominant role in the immune response than granzyme A and perforin.