Most stars and their planets form in open clusters. Over 95 per cent of such clusters have stellar densities too low (less than a hundred stars per cubic parsec) to withstand internal and external dynamical stresses and fall apart within a few hundred million years1. Older open clusters have survived by virtue of being richer and denser in stars (1,000 to 10,000 per cubic parsec) when they formed. Such clusters represent a stellar environment very different from the birthplace of the Sun and other planet-hosting field stars. So far more than 800 planets have been found around Sun-like stars in the field2. The field planets are usually the size of Neptune or smaller3,4,5. In contrast, only four planets have been found orbiting stars in open clusters6,7,8, all with masses similar to or greater than that of Jupiter. Here we report observations of the transits of two Sun-like stars by planets smaller than Neptune in the billion-year-old open cluster NGC6811. This demonstrates that small planets can form and survive in a dense cluster environment, and implies that the frequency and properties of planets in open clusters are consistent with those of planets around field stars in the Galaxy.