Global Positioning System (GPS) is used in various applications from positioning and navigating portable devices to time synchronizing power grid systems and telecommunication systems. However, GPS is vulnerable to a spoofing attack that transmits fake GPS signals to the victim’s GPS receiver to make the victim calculates the wrong geographic location or the wrong current time. In response, several countermeasures have been proposed, however, existing countermeasures are difficult to be applied to commercial receivers because they need additional hardware or existing system modification. In this paper, we present a novel GPS spoofing detection method using a commercial GPS receiver and machine learning. This method leverages binary classification to find the differences in the output values of commercial GPS receivers between authentic signals and spoofing signals. To train a machine learning model, we collected authentic signals transmitted from GPS satellites and spoofing signals from various types of GPS spoofers. The evaluation shows that the proposed method can detect GPS spoofing attacks with 99% detection accuracy and 0.2% false alarm rates. Also, the proposed method is independent of receivers and location, and robust against harsh environments. Finally, we interpreted the results and analyzed which features are important to detect a GPS spoofing attack.