In recent decades, concrete technology has seen a paradigm shift with the development of ultra-high-performance concrete (UHPC). These materials surpass traditional concrete in compressive strength (CS), tensile strength, durability, and ductility, making them ideal for various structural applications. This study investigates the application of four machine learning models: XGBoost (XGB), Gradient Boosting Machine (GBM), Adaptive Boosting (ADA), and CatBoost to predict the CS of UHPC. The dataset comprises 810 observations with 13 input features, including materials like cement, silica fume, and aggregates. Pearson correlation analysis and SHapley Additive exPlanations were utilized to determine the significance of each feature on CS. Results showed strong positive correlations of CS with cement, silica fume, fiber, superplasticizer, and age, while negative correlations were observed with limestone powder, fly ash, nano-silica, and aggregate. XGB demonstrated the highest predictive accuracy with R2 values of 0.977 (training) and 0.907 (testing), followed closely by GBM. ADA exhibited the weakest performance. Also, similar results were obtained from the visual interpretation study using the Taylor diagram and accuracy matrix. Overall, GBM and XGB emerged as the most reliable models for predicting UHPC CS, with GBM having a slight edge in generalization capabilities during testing.