Sub-20 nm sandwich-structured NaGdF4:Yb/Tm@NaLuF4:Yb/Tm@NaYF4 nanocrystals were fabricated for in vivo upconversion luminescence and computed tomography imaging.