The present food system is characterized by a linear flow of resources from rural areas into cities, where most food is consumed and essential nutrients discharged as wastewater. Limited water and phosphorus resources and large carbon footprints of chemical fertilizers drive increased recovery of water and nutrients for reuse in agriculture. Alongside end-of-pipe technologies at conventional wastewater treatment plants, nature-based solutions provide a robust and low-energy alternative solution. This paper assesses the potential of treatment processes using NBS to close water and nutrient cycles in the urban food system. A Substance Flow Analysis approach is used to quantify the recoverable urban nutrient (nitrogen, phosphorus, potassium) budget contained in household wastewater and biodegradable kitchen waste, using the city of Vienna, Austria, as an example. The developed model reflects the metabolization of water and nutrients by treatment wetlands and biogas digesters into fertigation water and fertilizer. It differentiates between specific crop nutrient requirements and yields, and by greenhouse and outdoor farming conditions in a temperate climate. Results indicate that, using NBS, the wastewater and kitchen waste from 77,250 persons could fully cover the nitrogen and phosphorus fertilizer demand of the entire vegetable production in Vienna, which currently supplies one-third of Vienna’s vegetable consumption. Additional people connected to the system can supply significant excess nutrients to produce other crops within and beyond the city. The model can inform selection and design of NBS for nutrient recovery and reuse, and support integrated planning regarding use of secondary nutrient sources and optimization of secondary nutrient utilization.