—Efficiency in photovoltaic (PV) energy production is significantly influenced by various electrical, environmental, and manufacturing-related factors. These variables often lead to a range of PV generator faults, compromising the system's performance and the overall grid's safety. The current fault detection methods can be complex and resource-intensive. In this paper, we propose a novel and efficient grid-connected PV system fault detection mechanism using the k-means clustering algorithm. Our approach categorizes the possible faults based on clustering the output PV and grid powers under healthy and faulty conditions. A comparison between centroid locations of both conditions leads to fault categorization. The findings demonstrate the efficacy of the proposed technique for addressing localized faults in grid-tied PV systems without the need for complicated calculations. The technique is both cost-effective and accurate, with a straightforward application that can be easily adopted by all stakeholders. This method enables users to safeguard their PV system's health and ensure the more comprehensive grid's safety.