The rapid worldwide outbreak of COVID-19 has posed serious and unprecedented challenges to healthcare systems in predicting disease behavior, consequences and resource utilization. Therefore, predicting the Length of Stay (LOS) is necessary to ensure optimal allocate of scarce hospital resources. The purpose of this research was to construct a model for predicting COVID-19 patients' hospital LOS by multiple Machine Learning (ML) algorithms. Using a single-center registry, we studied the records of 1225 laboratory-confirmed COVID-19 hospitalized patients from February 9, 2020, to December 20, 2020. The most important clinical parameters in the COVID-19 LOS prediction were identified with a correlation coefficient at the P-value< 0.2. Then, the prediction models were developed based on seven ML techniques according to selected variables. Finally, to evaluate the performances of those models several standard quantitative measures includes accuracy, sensitivity, specificity and ROC curve were used to evaluate the proposed predictive models. After implementing feature selection, a total of 20 variables was identified as the most relevant predictors to build the prediction models. The results indicated that the best performance belonged to the Support Vector Machine (SVM) algorithm with the mean accuracy of 99.5%, mean specificity of 99.7%, mean sensitivity of 99.4%, and the standard deviation of 1.2. The SVM provided a reasonable level of accuracy and certainty in predicting the LOS in COVID-19 patients and potentially facilitates hospital bed management, turnover and optimized resource allocation.