The need for reduction in CO2 emissions to mitigate global warming has resulted in increasing use of renewable energy sources. In urban areas, solar photovoltaic (PV) deployment on existing rooftops is one of the most viable sustainable energy resources. The present study uses a combination of support vector machines (SVMs) and geographic information systems (GIS) to estimate the rooftop solar PV potential for the urban areas at the commune level (the smallest administrative division) in Switzerland. The rooftop solar PV potential for a total 1901 out of 2477 communes in Switzerland is estimated. Following a 6-fold cross validation, the root-mean-square error (also normalized) is used to estimate the accuracy of the different SVM models. The results show that, on average, 81% of the total ground floor area of each building corresponds to the available roof area for the PV installation. Also considering the total available roof area for PV installation, that is, 328 km2 and roof orientations within ±90 degree of due south, the annual potential PV electricity production for the urban areas in Switzerland is estimated at 17.86 TW h (assumed 17% efficiency and 80% performance ratio). This amount corresponds to 28% of Switzerland’s electricity consumption in 2015.