General and electronic health literacy are important factors engaging in healthy behaviors and maintaining good health. The present study explored demographic factors associated with general and electronic health literacy in the Iranian adult population. Via stratified cluster sampling, trained interviewers visited adult residents in Qazvin Province, Iran between January, and April 2022. The participants (N = 9775; mean age = 36.44 years; 6576 [67.3%] females) completed the Health Literacy Instrument for Adults (HELIA) assessing health literacy and the eHealth Literacy Scale (eHEALS) assessing electronic health literacy. Demographic data, including age, gender, educational level, marital status, and living location (city or rural), were collected. Latent class analysis (LCA) was used to classify the participants into different health literacy/electronic health literacy levels. The relationships between health literacy/electronic health literacy levels and demographic factors were examined using χ2 or analysis of variance. The LCA used HELIA scores to suggest five classes of health literacy and eHEALS scores to suggest three classes of electronic health literacy. For general and electronic health literacy, similar relationships were with demographic factors: females as compared with males had better general/electronic health literacy; younger people as compared with older people had better general/electronic health literacy; higher educational level was associated with better general/electronic health literacy; and city residents as compared with rural residents had better general/electronic health literacy. In conclusion, Iranian governmental agencies may wish to target on males, older adults, people with low educational level, and rural residents to improve their health literacy.