The sea urchin Tripneustes gratilla is the most well-known seagrass grazer in the Western Indian Ocean and a few cases of overgrazing have been reported. However, few studies on their feeding preference have been performed in this region. In this study, the food items in the gut contents of T. gratilla collected from seagrass beds and in a bare sediment in intertidal areas of Dar es Salaam, Tanzania, were analysed and compared to their availability in the surrounding environment. A total of 59 micro and macro-algae species were identified from the environment and the guts of T. gratilla, of which 48 were found in both gut contents and the environment. Gut contents of T. gratilla collected from mono specific seagrass habitats were dominated by the species in which they were found. In a mixture of four different seagrass species, Syringodium isoetifolium was preferred (with electivity indices (E*) of +0.36) while Cymodocea rotundata, Halodule uninervis andThalassia hemprichii were slightly avoided (E* = -0.24, -0.22 and -0.22, respectively). We concluded that T. gratilla generally feeds on available seagrass species. However, in the presence of different types of seagrasses it showed preference to S. isoetifolium possibly due to presence of high epiphyte load which may increase its palatability. Key words: Tripneustes gratilla, seagrass, macroalga, microalgae, food preference, herbivory, Dar es Salaam.