Water systems need to become more locally robust and sustainable in view of increased population demands and supply uncertainties. Decentralized treatment is often assumed to have the potential to improve the technical, environmental, and economic performance of current technologies. The techno-economic feasibility of implementing independent building-scale decentralized systems combining rainwater harvesting, potable water production, and wastewater treatment and recycling was assessed for six main types of buildings ranging from single-family dwellings to high-rise buildings. Five different treatment layouts were evaluated under five different climatic conditions for each type of building. The layouts considered varying levels of source separation (i.e., black, grey, yellow, brown, and combined wastewater) using the corresponding toilet types (vacuum, urine-diverting, and conventional) and the appropriate pipes and pumping requirements. Our results indicate that the proposed layouts could satisfy 100% of the water demand for the three smallest buildings in all but the aridest climate conditions. For the three larger buildings, rainwater would offset annual water needs by approximately 74 to 100%. A comprehensive economic analysis considering CapEx and OpEx indicated that the cost of installing on-site water harvesting and recycling systems would increase the overall construction cost of multi-family buildings by around 6% and single-family dwellings by about 12%, with relatively low space requirements. For buildings or combined water systems with more than 300 people, the estimated total price of on-site water provision (including harvesting, treatment, recycling, and monitoring) ranged from $1.5/m3 to $2.7/m,3 which is considerably less than the typical tariffs collected by utilities in the United States and Western Europe. Where buildings can avoid the need to connect to centralized supplies for potable water and sewage disposal, water costs could be even lower. Urine-diversion has the potential to yield the least expensive solution but is the least well developed and had higher uncertainty in the cost analysis. More mature layouts (e.g., membrane bioreactors) exhibited less cost uncertainty and were economically competitive. Our analysis indicates that existing technologies can be used to create economically viable systems that greatly reduce demands on centralized utilities and, under some conditions, eliminate the need for centralized water supply or sewage collection.