During the Coronavirus pandemic, online classes and exams became popular to protect people's health. Despite the benefits, there were security issues and exam cheating. This research was conducted with the aim of comparing the amount and type of cheating in online and face-to-face exams using a qualitative method. The statistical population was all male and female students of the sixth grade of Pirbakran city in the academic year 2021-2022. In this research, a mixed rural school was selected using available sampling method and a structured face-to-face interview was conducted with all 14 sixth-grade students of the school. The interview questions were written and checked in MAXQDA software version 2020. From the analysis of the interviews, it was concluded that the rate of student cheating in online tests is much higher than that in face-to-face tests. The most common methods of cheating in online tests are the use of textbooks, the help of classmates, and the use of the Internet. Also, the most common method of cheating in face-to-face exams was the help of a classmate, and they considered the objective questions in the exams to be one of the important reasons for the ease of cheating. According to the findings of the research, the exams should be held in person as much as possible. In order to reduce cheating in the design of face-to-face and online tests, it is better to use more conceptual, in-depth and descriptive questions not published on the Internet browser; design different questions for students and explain the importance of studying and the negative points of cheating for students; replace four-choice questions with explanatory questions; increase the distance between the students in the face-to-face exam and control to prevent the presence of embedded fraud; not to answer the questions by the invigilators, and check students' pockets and hands in order to prevent cheating and avoid providing them with multiple draft sheets.