Estimating biodiversity and its change in space and time poses serious methodological challenges. First, there has been a long debate on how to quantify biodiversity, and second, measurements of biodiversity and its change are scale-dependent. Therefore, comparisons of biodiversity metrics between communities are ideally carried out across scales. Simulations can be used to study the behaviour of biodiversity metrics across scales, but most approaches are system specific, plagued by large parameter spaces, and therefore cumbersome to use and interpret. However, realistic spatial biodiversity patterns can be generated without reference to ecological processes, which suggests a simple simulation framework as important tool for ecologists. Here, we present the r package mobsim that allows users to simulate the abundances and the distributions of individuals of different species in a spatially explicit landscape. Users can define key properties of communities, including the total number of individuals, the species-abundance distribution (SAD) and the degree of intraspecific spatial aggregation. Furthermore, the package provides functions that derive biodiversity measures, such as rarefaction curves and species–area relationships (SAR), from simulated communities or from observed data, as well as functions that simulate different sampling designs. We show several example applications of the package. First, we illustrate how species rarefaction and accumulation curves can be used to disentangle changes in the fundamental components that underlie biodiversity: (i) total abundance, (ii) species-abundance distribution and (iii) species aggregation. Second, we demonstrate how mobsim can be applied to assess the performance of species-richness estimators. The latter indicates how spatial aggregation challenges classical non-spatial species-richness estimators. mobsim allows the simulation and analysis of a large range of biodiversity scenarios and sampling designs in a comprehensive way by directly manipulating key community properties. The simplicity and control provided by the package also makes it a useful didactic tool. The combination of controlled simulations and their analysis will facilitate a more rigorous interpretation of real-world data that exhibit sampling effects and scale dependence.