Accurate and timely water level prediction is of paramount importance in various applications, including flood forecasting, hydroelectric power management, and environmental monitoring. Traditional recurrent neural network (RNN)-based methods have been widely used for this task. However, recent advancements in long-term time-series forecasting have introduced transformer-based models that have significantly improved the performance in time-series prediction tasks. In this research, we investigate the application of transformer-based models to the task of water level prediction, specifically focusing on the Nhat Le River Basin. We conducted multiple experiments with different test cases and various model architectures, providing specific analyses of the model’s prediction capabilities. The transformer-based models consistently outperformed conventional RNN-based methods across a range of evaluation metrics, including root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R2). Moreover, these models exhibited excellent flood peak prediction accuracy, with errors consistently below 0.02 meters. The robustness and scalability of transformer-based models make them promising for accurate water-level predictions in real-world applications.