Blood glucose control is an essential goal for the patients who have Type-1 diabetes (T1D). The prediction of the blood glucose levels for the next 30-minute is crucial. If the predicted blood glucose level is in the critical ranges, and these predictions can be known in advance, then the patients can take the necessary cautions to prevent from it. In this article, we propose a modified fuzzy particle swarm optimization algorithm for the prediction of blood glucose levels of 30-minute after the last measurement. We form the average and patient-specific models to predict the blood glucose level of the patients. Both models are tested on two different datasets which contain patients with T1D. The experimental results are evaluated in terms of root mean squared error and Clarke error grid analysis metrics. The results indicate that our proposed modified algorithm is feasible to be applied to the prediction of blood glucose levels. In addition, this approach can assist patients with T1D for their blood glucose control.