Diabetes, a metabolic disease in which the blood glucose level rises over time, is one of the most common chronic diseases at present. It is critical to accurately predict and classify diabetes to reduce the severity of the disease and treat it early. One of the difficulties that researchers face is that diabetes datasets are limited and contain outliers and missing data. Additionally, there is a trade-off between classification accuracy and operational law for detecting diabetes. In this paper, an algorithm for diabetes classification is proposed for pregnant women using the Pima Indians Diabetes Dataset (PIDD). First, a preprocessing step in the proposed algorithm includes outlier rejection, imputing missing values, the standardization process, and feature selection of the attributes, which enhance the dataset’s quality. Second, the classifier uses the fuzzy KNN method and modifies the membership function based on the uncertainty theory. Third, a grid search method is applied to achieve the best values for tuning the fuzzy KNN method based on uncertainty membership, as there are hyperparameters that affect the performance of the proposed classifier. In turn, the proposed tuned fuzzy KNN based on uncertainty classifiers (TFKNN) deals with the belief degree, handles membership functions and operation law, and avoids making the wrong categorization. The proposed algorithm performs better than other classifiers that have been trained and evaluated, including KNN, fuzzy KNN, naïve Bayes (NB), and decision tree (DT). The results of different classifiers in an ensemble could significantly improve classification precision. The TFKNN has time complexity O(kn2d), and space complexity O(n2d). The TFKNN model has high performance and outperformed the others in all tests in terms of accuracy, specificity, precision, and average AUC, with values of 90.63, 85.00, 93.18, and 94.13, respectively. Additionally, results of empirical analysis of TFKNN compared to fuzzy KNN, KNN, NB, and DT demonstrate the global superiority of TFKNN in precision, accuracy, and specificity.