The role of urban agriculture is highly valued in both developed and developing countries. Urban agriculture is an important aspect of the wider issue of urban sustainability. However, it is considered to be a possible threat to the sustainability of cities, while at the same time it is considered to greatly contribute to sustainable urban development. In this research, sustainability of urban agriculture will be discussed through a comparative analysis of Tokyo and Shanghai by using an Internet survey method. The function of urban agriculture expected by local residents and its relationship with urban development will be clarified. Furthermore, the effects of urban agriculture on the welfare of residents will also be considered from an economic viewpoint. JEL Classification: I31, Q15, Q56, R14