Abstract Background Antibiotic resistance is a global health threat. Public knowledge is considered a prerequisite for appropriate use of antibiotics and limited spread of antibiotic resistance. Our aim was to examine the level of knowledge of antibiotics and antibiotic resistance among Norwegian pharmacy customers, and to assess to which degree beliefs, attitudes and sociodemographic factors are associated with this knowledge. Methods A questionnaire based, cross-sectional study was conducted among pharmacy customers in three Norwegian cities. The questionnaire covered 1) knowledge of antibiotics (13 statements) and antibiotic resistance (10 statements), 2) the general beliefs about medicines questionnaire (BMQ general) (three subdomains, four statements each), 3) attitudes toward antibiotic use (four statements), and 4) sociodemographic factors, life style and health. High knowledge level was defined as > 66% of maximum score. Factors associated with knowledge of antibiotics and antibiotic resistance were investigated through univariate and multiple linear regression. Hierarchical model regression was used to estimate a population average knowledge score weighted for age, gender and level of education. Results Among 877 participants, 57% had high knowledge of antibiotics in general and 71% had high knowledge of antibiotic resistance. More than 90% knew that bacteria can become resistant against antibiotics and that unnecessary use of antibiotics can make them less effective. Simultaneously, more than 30% erroneously stated that antibiotics are effective against viruses, colds or influenza. Factors positively associated with antibiotic knowledge were health professional background, high education level, and a positive view on the value of medications in general. Male gender, a less restrictive attitude toward antibiotic use, and young age were negatively associated with antibiotic knowledge. The mean overall antibiotic knowledge score was relatively high (15.6 out of maximum 23 with estimated weighted population score at 14.8). Conclusions Despite a high level of knowledge of antibiotics and antibiotic resistance among Norwegian pharmacy customers, there are obvious knowledge gaps. We suggest that action is taken to increase the knowledge level, and particularly target people in vocational, male dominated occupations outside the health service, and primary/secondary school curricula.