Cyberbullying on social media has emerged as a growing concern affecting online safety, particularly among Swahili-speaking communities that lack robust automatic detection tools. This paper aims to evaluate the effectiveness of machine learning models in detecting cyberbullying in Swahili social media content. The study’s key contributions include the creation of a Swahili text corpus sourced from social media, pre-processing the dataset to ensure linguistic and structural consistency, training natural language processing models on the labelled data and evaluating model performance using accuracy, precision, recall, and F1-score. Four supervised machine learning algorithms, such as Support Vector Machine (SVM), Naïve Bayes (NB), Decision Tree (DT), and Logistic Regression (LR), were implemented and tested with two feature extraction methods: Term Frequency–Inverse Document Frequency (TF-IDF) and Count Vectorizer (CV). Experimental results show that the Decision Tree model with TF-IDF achieved the highest accuracy of 96.40%, precision of 90.58%, recall of 87.49%, and F1-score of 89.01%, outperforming all other models. These findings demonstrate the feasibility of developing efficient and language-specific cyberbullying detection systems for Swahili. Future work recommends expanding the dataset, incorporating deep learning and transformer-based models and developing culturally aware Swahili lexicons to enhance accuracy and contextual understanding. The study contributes to advancing multilingual natural language processing and promoting safer digital interactions in low-resource linguistic environments.