Data regarding the potential link between acid suppressant use and dementia are inconsistent. This study assessed the association between cumulative exposure to proton pump inhibitors (PPIs) and histamine-2 receptor antagonists (H2RAs) and dementia risk among Korean adults. A population-based longitudinal study was conducted using the Korean National Health Insurance Corporation claims database merged with national health examination data for 2002-2013. The study cohort included 70,529 subjects who were dementia-free in 2007. Incident dementia was assessed throughout follow-up until 2013. Exposure to acid suppressants prior to 2007 was assessed using a standardized defined daily dose system. Potential associations between acid suppressant use and dementia risk were analyzed using time-dependent Cox regression estimated hazard ratios (HRs) and 95% confidence intervals (CIs). There were 1,297 cases of dementia during the study period. Multivariate analyses identified several factors associated with dementia risk: old age, female, current smoker, Type 2 diabetes, comorbidities, and use of nonaspirin nonsteroidal anti-inflammatory drugs. H2RA users had a significantly increased risk of dementia compared with non-H2RA users (HR 1.31, 95% CI 1.13-1.51), whereas PPI use was not associated with increased risk. Our results indicate that exposure to H2RAs (but not PPIs) is associated with increased dementia risk. Further randomized controlled trials and basic research examining the underlying mechanism are needed to confirm this association.