Purpose This study aims to identify the factors influencing consumer perception and adoption intention toward online pharmacy. Design/methodology/approach A questionnaire was formulated based on the unified theory of acceptance and use of technology (UTAUT) framework scales available in the existing literature. An aggregate of 451 respondents participated in the survey. To test the formulated hypothesis, confirmatory factor analysis and structure equation modeling are used for analyzing the structural relationships between dependent and independent variables. Findings This analysis inspects the significant effect of perceived trust, consumer perception and different UTAUT framework constructs on the adoption intention of online pharmacy consumers. The results determine the substantial moderating effect of perceived trust between adoption intention and consumers’ perception of online pharmacies. Research limitations/implications This research extended the application of the UTAUT model with the adoption intention of online pharmacy consumers. Only specific constructs have been selected from the UTAUT model in this study. Practical implications The study outcomes are useful to pharmacy managers to realize the role of technological platforms in facilitating the online selling of medicines to pharmacy consumers. Social implications The findings are helpful for pharmaceutical companies to improve their existing online buying process for pharmacy consumers seeking purchase of medicines through online pharmacies. Originality/value This analysis is unique and contains newness in the form of the moderating role of perceived trust between constructs of UTAUT and customer adoption of online pharmacies.