In the religion of Islam, the Quran and Hadith are considered the principal sources of legislation, and they comprise a large amount of knowledge in an unstructured textual form. Islamic texts are organized in such a way that automatic exploitation is both challenging and difficult to achieve. Lately, researchers have been interested in developing a formal description of Qur’an and Hadith semantics based on ontologies to allow computer systems to leverage their knowledge. The main problem in this field is the lack of a complete ontology that allows for a thorough understanding of Islamic texts. In this article, we attempted to solve this problem by developing an ontology covering the maximum amount of data possible. For the Hadith ontology, we opted for a method using only protégé plugins, where we based our work on Comma-Separated Values (CSV) files containing Hadith texts in Arabic and English with all the related data. This method allowed us to ensure the correctness of the results. The final result of this research is a complete Hadith ontology containing a total of 6 classes and 58 487 individuals, of which 34 373 are Hadiths in Arabic and English, with all the related data such as the list of narrators, the book, the chapter mentioned, and the topic it discusses. To further extend the ontology, we merged the Hadith ontology with full pre-existing Qur’an ontologies to build the OntoDin ontology, representing the Islamic texts with 51 classes and 168 122 individuals in Arabic and English.