Galaxies as seen through the most energetic explosions in the universe Gamma-ray bursts (GRBs) are explosions of stars (longer than 2 seconds) or merging compact objects (neutron stars / black holes, shorter than 2 seconds). Although GRBs are the most energetic events after the Big Bang, their detection and localization are still very difficult. Systematic search during the past 17 years led to 330 spectroscopic redshifts; for about half of them, the host galaxy was studied in some detail. Despite the small numbers, their impact on our understanding of galaxies is large. GRB hosts offer the opportunity to explore regions of the universe which are observationally hostile for traditional means, due to gas and dust absorption, or to the large distance. The typical long-GRB host galaxy at low redshift is small, star-forming and metal poor, whereas explorations in recent years at intermediate-redshift have revealed the presence of more massive, dusty and chemically evolved galaxies. Finally, z > 5 long-GRB hosts have given so far elusive results, indicating very small galaxies, smaller than what is reachable today with NIR deep surveys. The common factor is the stellar progenitor: in long GRBs these are very massive rare/short-lived stars, present in young regions whose redshift evolution is closely related to the star-formation history of the universe.