Soil organic carbon (SOC) is an essential soil property that plays an important role in sustainable agricultural production. Recently, there has been considerable interest in utilizing data mining and spatial modeling techniques for SOC estimation through machine learning methods, leveraging remote sensing data and terrain attributes. This study aimed to evaluate and compare several machine learning techniques, specifically Random Forest (RF), Support Vector Machine (SVM), and Extreme Gradient Boosting (XGBoost), for predicting SOC levels across various landforms in northwestern Iran. A total of 402 soil samples were collected, and their SOC content was measured. Furthermore, remote sensing indices obtained from Landsat 8 satellite imagery and terrain attributes from digital elevation models were used. The measured and predicted SOC values generated from the machine learning methods were compared across different landforms. The results indicated that the RF method achieved the highest accuracy in predicting SOC (R-2 = 0.84, RMSE = 0.04, AIC = -825, BIC = -840). Spatial distribution analysis revealed that only a small portion of the study area exhibited high SOC content, while most of the region had SOC content below 1%. Moreover, a comparison means values of SOC across different landforms indicated that SOC content in upper slope landforms were significantly lower than those in other landforms. Finally, the comparison of measured and predicted values across the three models showed that the RF method provided results closely aligned with the actual SOC content across all examined landforms. This study emphasizes that enhanced techniques for evaluating soil properties mark a notable progression in soil modeling, facilitating better management of soil resources.