This document presents the 2012 evidence based guidelines of the Swedish Society of Infectious Diseases for the in- hospital management of adult immunocompetent patients with community-acquired pneumonia (CAP). The prognostic score 'CRB-65' is recommended for the initial assessment of all CAP patients, and should be regarded as an aid for decision-making concerning the level of care required, microbiological investigation, and antibiotic treatment. Due to the favourable antibiotic resistance situation in Sweden, an initial narrow-spectrum antibiotic treatment primarily directed at Streptococcus pneumoniae is recommended in most situations. The recommended treatment for patients with severe CAP (CRB-65 score 2) is penicillin G in most situations. In critically ill patients (CRB-65 score 3-4), combination therapy with cefotaxime/macrolide or penicillin G/fluoroquinolone is recommended. A thorough microbiological investigation should be undertaken in all patients, including blood cultures, respiratory tract sampling, and urine antigens, with the addition of extensive sampling for more uncommon respiratory pathogens in the case of severe disease. Recommended measures for the prevention of CAP include vaccination for influenza and pneumococci, as well as smoking cessation.