Already during early life, chickens need to cope with chronic stressors that can impair their health and welfare, with stocking density being one of the most influential factors. Nevertheless, there is a gap in research on the influence of stocking density on laying hens during rearing and in the subsequent laying period. This study therefore investigated how stocking density during rearing affects the immune system and welfare of pullets, and whether effects are persistent later in life. Pullets were reared at either low (13 birds/m
2
) or high (23 birds/m
2
) stocking densities but in identical group sizes from wk 7 to 17. Afterward, hens were kept at the same stocking density (2.4 birds/m
2
) until wk 28. Blood and tissue samples (spleen and cecal tonsils) were collected at the end of the rearing period and in the laying period. The parameters evaluated encompassed number and distribution of leukocytes and lymphocyte subsets in blood and lymphatic tissue, lymphocyte functionality, plasma corticosterone concentrations as well as behavior and physical appearance of hens. At the end of rearing, pullets kept under high stocking density had lower numbers of T lymphocytes, especially γδ T cells in blood, spleen, and cecal tonsils and displayed a higher heterophil to lymphocyte ratio. These effects are mostly persistent during the laying period, although stocking density was identical at this time. Furthermore, birds from the high stocking density group showed less active behavior, more pecking behavior and worse physical appearance throughout both examination periods. In conclusion, stocking density during rearing affects pullets' immune system and behavior not only in the rearing, but also subsequently in the laying period, indicating a strong correlation between health and welfare during rearing and the laying period.