Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:24:2

The ˹unmarried˺ woman or ˹unmarried˺ man found guilty of sexual intercourse - lash each one of them with a hundred lashes, and do not be taken by pity for them in the religion of Allah, if you should believe in Allah and the Last Day. And let a group of the believers witness their punishment.  

As for the fornicatress and the fornicator, that is, of those not in wedlock — because those ˹in wedlock˺ are stoned according to the Sunna (the al ˹in al-zāniya, ‘the fornicatress’, and al-zānī, ‘the fornicator’˺ according to some mentioned ˹opinions˺ is a relative ˹particle˺; the clause ˹al-zāniyatu wa’l-zānī˺ is a subject, and because of its similarity to a conditional, the fā’ has been inserted into the predicate, which is ˹the following, fa’jlidū˺): strike each of them a hundred lashes, ˹a hundred˺ strikes (one says jaladahu to mean daraba jildahu, ‘he struck him on the skin’). According to the Sunna, in addition to this ˹punishment˺ there is also banishment for a whole year. The slave, however, receives half of the mentioned ˹punishment˺. And do not let any pity for them overcome you in God’s religion, that is to say, in ˹the fulfilment of˺ His rulings, by disregarding any part of their prescribed punishment, if you believe in God and the Last Day, namely, the Day of Resurrection: in this ˹statement˺ there is an incitement to ˹abide by˺ what was ˹mentioned˺ before the conditional ˹above˺ and it also constitutes the response to the latter, or ˹at least is˺ an indication of the response to it. And let their punishment, the flogging, be witnessed by a group of the believers — some say ˹that this should be a group of˺ three; some say four, as in the number of witnesses testifying to an act of fornication.
القرآن:٢٤:٢

الزَّانِيَةُ وَالزَّانِي فَاجْلِدُوا كُلَّ وَاحِدٍ مِنْهُمَا مِائَةَ جَلْدَةٍ ۖ وَلَا تَأْخُذْكُمْ بِهِمَا رَأْفَةٌ فِي دِينِ اللَّهِ إِنْ كُنْتُمْ تُؤْمِنُونَ بِاللَّهِ وَالْيَوْمِ الْآخِرِ ۖ وَلْيَشْهَدْ عَذَابَهُمَا طَائِفَةٌ مِنَ الْمُؤْمِنِينَ  

{الزانية والزاني} أي غير المحصنين لرجمهما بالسنة وأل فيما ذكر موصولة وهو مبتدأ ولشبه بالشرط دخلت الفاء في خبره وهو {فاجلدوا كل واحد منهما مائة جلدة} ضربة يقال جَلَدهُ: ضربَ جلدهُ ويزاد على ذلك بالسنة تغريب عام والرقيق على النصف مما ذكر {ولا تأخذكم بهما رأفة في دين الله} أي حكمه بأن تتركوا شيئا من حدهما {إن كنتم تؤمنون بالله واليوم الآخر} أي يوم البعث في هذا تحريض على ما قبل الشرط وهو جوابه أو دال على جوابه {وليشهد عذابهما} الجلد {طائفة من المؤمنين} قيل ثلاثة وقيل أربعة عدد شهود الزنا.