Urban trees are of high importance for healthy urban ecosystems. However, some trees are invasive plants that may ‘escape’ from urban areas into natural environments. Furthermore, invasive forest pests often arrive and establish in urban environments before they spread to forest ecosystems. Therefore, knowledge of tree species composition in urban areas is important for the biosecurity of cities and surrounding forests. Despite this, urban tree inventories often lack information on trees on private properties. To assess the potential role of urban areas as a source of invasive trees as well as invasive pests of trees, we compared the species composition of urban trees in public and private spaces in several Swiss cities and in tree nurseries (henceforth: ‘nurseries’) in Switzerland. We analysed the various data sets we compiled regarding invasive tree species, and examined how many trees are potential hosts for invasive quarantine pests of trees. We found no statistically significant difference in tree species composition in public and private urban areas, but the proportion of non-native trees was higher in private than in public spaces. Tree species available in nurseries and those present in cities were not significantly different, with larger urban tree inventories having a greater overlap with the species available in nurseries. Five of eight tree species considered invasive whose sale was banned since September 2024 were still on sale ten months before the ban came into force. All eight tree species were present in urban tree inventories. Importantly, between 91 % and 97 % of all urban trees in public and private spaces were suitable hosts for at least one quarantine forest pest. Given the pivotal role that urban trees play for the health of urban and peri-urban ecosystems, knowledge of tree species composition is essential from a biosecurity perspective. Our findings suggest that the combination of public urban tree inventories and trees available from nurseries can provide an estimate of the composition of private urban trees and can be useful for invasive species monitoring.