Floods are among the most devastating environmental hazards that directly and indirectly affect people's lives and activities. In many countries, sustainable environmental management requires identifying inundated-prone areas to avoid potential hazards. In this study, the performance and capabilities of seven machine learning algorithms (MLAs) were tested, evaluated, and compared for flood susceptibility mapping. These MLAs include support vector machine (SVM), random forest (RF), multivariate adaptive regression spline (MARS), boosted regression tree (BRT), functional data analysis (FDA), general linear model (GLM), and multivariate discriminant analysis (MDA). In this study, machine learning algorithms (using R open source software) and spatial datasets (extracted using GIS) for flood susceptibility modeling were conducted between the cities of Safaga and Ras Gharib, Red Sea, Egypt. Initially, 420 actual inundated areas were collected from the study area to create a flood inventory map. Different sources were utilized, including remote sensing data (high and medium resolution), geologic and topographic maps, previous documents, and field investigations. The inventory data were divided randomly into two training groups: 70% and validation group: 30%. Ten flood-related factors were generated for flood susceptibility modeling: altitude, slope aspect, lithology, land use/land cover (LULC), slope length (LS), topographic wetness index (TWI), slope angle, profile curvature, plan curvature, stream power index (SPI), and hydrolithology units. Flood-related factors were tested using a multicollinearity test, variance inflation factors (VIF), and tolerance (TOL), and their importance was evaluated using a partial least squares (PLS) technique. In addition, model performances and comparisons were calculated using the area under the curve (AUC-ROC) approach. Our findings showed that the AUC values for these seven MLTs were divided into two groups: high fitness models (AUC > 80%), including RF, MARS, and GLM, and moderate performance models (AUC between 70% and 80%), including BRT, FDA, and SVM. The results of this study and the flood susceptibility maps could be useful for mitigating environmental problems, future development activities in the area, and flood control areas.