Accurate bearing capacity assessment under load conditions is essential for the design of concrete-filled steel tube (CFST) columns. This paper presents an optimization-based machine learning method to estimate the ultimate compressive strength of rectangular concrete-filled steel tube (RCFST) columns. A hybrid model, GS-SVR, was developed based on support vector machine regression (SVR) optimized by the grid search (GS) algorithm. The model was built based on a sample of 1003 axially loaded and 401 eccentrically loaded test data sets. The predictive performance of the proposed model is compared with two commonly used machine learning models and two design codes. The results obtained for the axial loading dataset with R2 of 0.983, MAE of 177.062, RMSE of 240.963, and MAPE of 12.209%, and for the eccentric loading dataset with R2 of 0.984, MAE of 93.234, RMSE of 124.924, and MAPE of 10.032% show that GS-SVR is the best model for predicting the compressive strength of RCFST columns under axial and eccentric loadings. It is an effective alternative method that can be used to assist and guide the design of RCFST columns to save time and cost of some laboratory experiments. Additionally, the impact of input parameters on the output was investigated.