Environmental issues and the depletion of fossil fuels continue to escalate as the number of fossil fuel-based vehicle users increases in Indonesia. Electric vehicles emerge as one of the potential alternative solutions to address current environmental challenges, given their eco-friendly nature and lack of pollution emissions. Sentiment analysis is conducted to understand public responses, both supportive and opposing, towards electric vehicles. This research aims to analyze the sentiment of X-social media users regarding electric vehicles using machine learning techniques. The research stages include data collection, data selection, preprocessing, and classification using Naïve Bayes Classifier (NBC), Support Vector Machine (SVM), and K-Nearest Neighbor (KNN) algorithms. The test results show that on a balanced dataset using ROS, SVM performs the best with accuracy = 68.7%, precision = 77.9%, and recall = 68.4%. Meanwhile, NBC yields an accuracy of 60.3%, precision of 61.3%, and recall of 60.3%, while KNN has an accuracy of 53.9%, precision of 54%, and recall of 53.9%.