Titanium dioxide (TiO2) is the most popular material for applications in solar-energy conversion and photocatalysis, both of which rely on the creation, transport, and trapping of charges (holes and electrons). The nature and lifetime of electron traps at room temperature have so far not been elucidated. Herein, we use picosecond X-ray absorption spectroscopy at the Ti K-edge and the Ru L3-edge to address this issue for photoexcited bare and N719-dye-sensitized anatase and amorphous TiO2 nanoparticles. Our results show that 100 ps after photoexcitation, the electrons are trapped deep in the defect-rich surface shell in the case of anatase TiO2, whereas they are inside the bulk in the case of amorphous TiO2. In the case of dye-sensitized anatase or amorphous TiO2, the electrons are trapped at the outer surface. Only two traps were identified in all cases, with lifetimes in the range of nanoseconds to tens of nanoseconds.