Explosive volcanic eruptions, resulting from magma fragmentation, pose significant threats to inhabited regions. The challenge of achieving fragmentation conditions in less evolved compositions, such as andesites and basalts, stems from their low viscosities. Recent research highlights the role of Fe-Ti-oxide nanocrystals (nanolites) in increasing melt viscosity, yet the mechanisms behind the impact of nanocrystallization remain a subject of ongoing debate. To assess their effect on melt viscosity, we introduce innovative viscosity models exclusively utilizing nanolite-free viscosity data. Our study unveils the first in-situ imaging of nanolite formation in andesitic melt resulting in a heterogeneous distribution of elements, generating a relatively SiO2-enriched matrix and Al-enriched shells around nanolites. This phenomenon results in a substantial, up to 30-fold increase in magma viscosity at eruptive temperatures. By incorporating nanoscale observations of fragmented magma from the literature, we deduce that elemental heterogeneities might play a critical role in driving magmas towards failure conditions.