Three-dimensional (3D) printing in the construction industry is growing rapidly due to its inherent advantages, including intricate geometries, reduced waste, accelerated construction, cost-effectiveness, eco-friendliness, and improved safety. However, optimizing the mixture composition for 3D-printed concrete remains a formidable task, encompassing multiple variables and requiring a comprehensive trial-and-error experimentation process. Accordingly, this study used seven machine learning (ML) algorithms, including support vector regression (SVR), decision tree (DT), SVR-Bagging, SVR-Boosting, random forest (RF), gradient boosting (GB), and gene expression programming (GEP) for forecasting the compressive strength (CS) of 3D printed fiber-reinforced concrete (3DP-FRC). For model development, 299 data points were collected from experimental studies and split into two portions: 70% for model training and 30% for model validation. Various statistical metrics were employed to examine the accuracy and generalizability of the established models. The DT, RF, GB, and GEP models demonstrated higher accuracy in the validation set, achieving correlation (R) values of 0.987, 0.986, 0.986, and 0.98, respectively. The DT, RF, GB, and GEP models exhibited mean absolute error (MAE) scores of 4.644, 3.989, 3.90, and 5.691, respectively. Furthermore, the combination of SVR with boosting and bagging techniques slightly improved the accuracy compared to the individual SVR model. Additionally, the SHapley Additive exPlanations (SHAP) approach unveils the proportional significance of parameters in influencing the CS of 3DP-FRC. The SHAP technique revealed that water, silica fume, superplasticizer, sand content, and loading directions are the dominant parameters in estimating the CS of 3DP-FRC. The SHAP local interpretability unveils the intrinsic relationship between diverse input variables and their impacts on the strength of 3DP-FRC. The SHAP interpretability offers significant insights into the optimum mix proportion of 3DP-FRC.