Background Information about the global structure of agriculture and nutrient production and its diversity is essential to improve present understanding of national food production patterns, agricultural livelihoods, and food chains, and their linkages to land use and their associated ecosystems services. Here we provide a plausible breakdown of global agricultural and nutrient production by farm size, and also study the associations between farm size, agricultural diversity, and nutrient production. This analysis is crucial to design interventions that might be appropriately targeted to promote healthy diets and ecosystems in the face of population growth, urbanisation, and climate change. Methods We used existing spatially-explicit global datasets to estimate the production levels of 41 major crops, seven livestock, and 14 aquaculture and fish products. From overall production estimates, we estimated the production of vitamin A, vitamin B 12 , folate, iron, zinc, calcium, calories, and protein. We also estimated the relative contribution of farms of different sizes to the production of different agricultural commodities and associated nutrients, as well as how the diversity of food production based on the number of different products grown per geographic pixel and distribution of products within this pixel (Shannon diversity index [H]) changes with different farm sizes. Findings Globally, small and medium farms (≤50 ha) produce 51–77% of nearly all commodities and nutrients examined here. However, important regional differences exist. Large farms (>50 ha) dominate production in North America, South America, and Australia and New Zealand. In these regions, large farms contribute between 75% and 100% of all cereal, livestock, and fruit production, and the pattern is similar for other commodity groups. By contrast, small farms (≤20 ha) produce more than 75% of most food commodities in sub-Saharan Africa, southeast Asia, south Asia, and China. In Europe, west Asia and north Africa, and central America, medium-size farms (20–50 ha) also contribute substantially to the production of most food commodities. Very small farms (≤2 ha) are important and have local significance in sub-Saharan Africa, southeast Asia, and south Asia, where they contribute to about 30% of most food commodities. The majority of vegetables (81%), roots and tubers (72%), pulses (67%), fruits (66%), fish and livestock products (60%), and cereals (56%) are produced in diverse landscapes (H>1·5). Similarly, the majority of global micronutrients (53–81%) and protein (57%) are also produced in more diverse agricultural landscapes (H>1·5). By contrast, the majority of sugar (73%) and oil crops (57%) are produced in less diverse ones (H≤1·5), which also account for the majority of global calorie production (56%). The diversity of agricultural and nutrient production diminishes as farm size increases. However, areas of the world with higher agricultural diversity produce more nutrients, irrespective of farm size. Interpretation Our results show that farm size and diversity of agricultural production vary substantially across regions and are key structural determinants of food and nutrient production that need to be considered in plans to meet social, economic, and environmental targets. At the global level, both small and large farms have key roles in food and nutrition security. Efforts to maintain production diversity as farm sizes increase seem to be necessary to maintain the production of diverse nutrients and viable, multifunctional, sustainable landscapes. Funding Commonwealth Scientific and Industrial Research Organisation, Bill & Melinda Gates Foundation, CGIAR Research Programs on Climate Change, Agriculture and Food Security and on Agriculture for Nutrition and Health funded by the CGIAR Fund Council, Daniel and Nina Carasso Foundation, European Union, International Fund for Agricultural Development, Australian Research Council, National Science Foundation, Gordon and Betty Moore Foundation, and Joint Programming Initiative on Agriculture, Food Security and Climate Change—Belmont Forum.