1. Aquatic plants are a key component of spatial heterogeneity in a waterscape, contributing to habitat complexity and helping determine diversity at various spatial scales. Theoretically, the more complex a habitat, the higher the number of species present. 2. Few empirical data are available to test the hypothesis that complexity increases diversity in aquatic communities (e.g. Jeffries, 1993). Fractal dimension has become widely applied in ecology as a tool to quantify the degree of complexity at different scales. 3. We investigated the hypothesis that complexity in vegetated habitat in two tropical lagoons mediates littoral invertebrate number of taxa (S) and density (N). Aquatic macrophyte habitat complexity was defined using a fractal dimension and a gradient of natural plant complexities. We also considered plant area, plant identity and, only for S, invertebrate density as additional explanatory variables. 4. Our results indicate that habitat complexity provided by the different architectures of aquatic plants, significantly affects both S and total N. However, number of individuals (as a result of passive sampling) also helps to account for S and, together with plant identity and area, contributes to the determination of N. We suggest that measurements of structural complexity, measured through fractal geometry, should be included in studies aimed at explaining attributes of attached invertebrates at small (e.g. plant or leaf) scales.