The immune checkpoints programmed death-1 (PD-1) and its ligand PD-L1 are major players in the escape of cancer cells from anticancer immune responses. Monoclonal antibodies targeting PD-1 and PD-L1 have shown unprecedented efficacy to treat advanced stage cancer, admitting in subsets of patients and selected cancer types. Therefore, developing innovative and efficacious theranostics that allow patient selection and monitoring next to effective treatment is warranted. Single domain antibodies (sdAbs), also-called nanobodies, are small sized, antigen-binding moieties that efficiently penetrate into tumors, and moreover generate high contrast in noninvasive imaging, making them prime candidates for development of novel theranostics. In this thesis, we report on the generation and validation of mouse or human PD-L1-specific sdAbs. Screening of alpaca immune libraries followed by further characterization using ELISA, flow cytometry and surface plasmon resonance (SPR), led to the selection of lead sdAbs that bind selectively and with high affinity to either mouse or human PD-L1. SPECT/CT imaging in mice using Technetium-99m-labeled sdAbs that target mouse or human PD-L1 revealed that the selected sdAbs generate high signal-to-noise ratios and have the strong ability to specifically detect mouse or human PD-L1 expression in multiple tumor models. Furthermore, we showed that sdAb K2, that binds with high affinity to human PD-L1, competes with the FDA-approved antibody avelumab for the binding to PD-L1 and has the ability to block the interaction between PD-L1 and PD-1, thereby facilitating de novo activation of antigen-specific T cells and enhancing the functionality of T cells. Taken together, these data indicate that sdAb K2 has a high potential as a theranostic agent in cancer management.