Carbonation is a significant factor contributing to the instability of concrete structures. This study proposes two prediction models based on the gradient boosting decision tree (GBDT) to address the challenge of predicting concrete carbonation depth. This study integrates GBDT with two metaheuristic algorithms, particle swarm optimization algorithm (PSO) and sparrow search optimization algorithm (SSA), forming two hybrid models, PSO-GBDT and SSA-GBDT, aimed at enhancing prediction accuracy. Six influencing parameters (FA, t, w/b, B, RH, and CO2) were selected as input features to train and evaluate the hybrid models, with the concrete carbonation depth was used as the output. A database containing 883 groups of cases was established. Finally, three classic models, GBDT, ANN and SVR, were compared against the two hybrid models. To enhance model generalization, all models were subjected to five-fold cross validation. Four evaluation indicators (RMSE, R2, MAE, and VAF) and Taylor diagrams were employed to comprehensively assess these models. The results indicated that the two hybrid models exhibited superior prediction performance in the dataset (training set: R2, VAF>0.98, testing set: R2, VAF>0.96). The SSA-GBDT model achieved the highest prediction performance (RMSE= 2.7008, R2= 0.9639, MAE= 1.7691, VAF= 0.9627). Additionally, the SSA-GBDT model identified exposure time (t) as the feature with the greatest impact. This study demonstrates the applicability of the SSA-GBDT models in predicting concrete carbonation depth, offering a novel approach for improving accuracy in such predictions.