Axial bearing capacity of piles is the most important parameter in pile foundation design. In this paper, artificial neural network (ANN) and random forest (RF) algorithms were utilized to predict the ultimate axial bearing capacity of driven piles. An unprecedented database containing 2314 driven pile static load test reports were gathered, including the pile diameter, length of pile segments, natural ground elevation, pile top elevation, guide pile segment stop driving elevation, pile tip elevation, average standard penetration test (SPT) value along the embedded length of pile, and average SPT blow counts at the tip of pile as input variables, whereas the ultimate load on pile top was considered as output variable. The dataset was divided into the training (70%) and testing (30%) parts for the construction and validation phases, respectively. Various error criteria, namely mean absolute error (MAE), root mean squared error (RMSE), and the coefficient of determination (R2) were used to evaluate the performance of RF and ANN algorithms. In addition, the predicted results of pile load tests were compared with five empirical equations derived from the literature and with classical multi-variable regression. The results showed that RF outperformed ANN and other methods. Sensitivity analysis was conducted to reveal that the average SPT value and pile tip elevation were the most important factors in predicting the axial bearing capacity of piles.