<p class="IOPText">Monitoring fetal health during pregnancy ensures safe delivery and the newborn’s well-being. The fetal electrocardiogram (fetal ECG) is a valuable tool for assessing fetal cardiac health, but interpretation of ECG data can be challenging due to its complexity and variability. In this work, we explore the application of machine learning, particularly random forest, to predict and analyze fetal ECGs. With its ability to manage large datasets and provide precise insights, random forest is a promising solution for this challenge. By comparing our random forest-based approach with other standard machine learning techniques such as artificial neural network (ANN), support vector machines (SVM), and recurrent neural networks (RNN), we observed that our solution outperformed these methods in accuracy, robustness, and reliability. This article details the methodology used, the implementation of the algorithm, as well as the comparative results obtained. Emphasis is placed on the benefits of random forest in this specific medical context, highlighting its potential as a future tool for fetal ECG prediction. Ultimately, our research suggests a shift toward random forest-based solutions for more efficient and accurate analysis of fetal ECGs, with direct implications for clinical practice and fetal well-being.</p>