Aims/hypothesis The aim of the study was to characterise the humoral response against severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) in patients with diabetes. Demonstrating the ability to mount an appropriate antibody response in the presence of hyperglycaemia is relevant for the comprehension of mechanisms related to the observed worse clinical outcome of coronavirus disease 2019 (COVID-19) pneumonia in patients with diabetes and for the development of any future vaccination campaign to prevent SARS-CoV-2 infection. Methods Using a highly specific and sensitive measurement of antibodies by fluid-phase luciferase immunoprecipitation assays, we characterised the IgG, IgM and IgA response against multiple antigens of SARS-CoV-2 in a cohort of 509 patients with documented diagnosis of COVID-19, prospectively followed at our institution. We analysed clinical outcomes and antibody titres according to the presence of hyperglycaemia, i.e., either diagnosed or undiagnosed diabetes, at the time of, or during, hospitalisation. Results Among patients with confirmed COVID-19, 139 (27.3%) had diabetes: 90 (17.7%) had diabetes diagnosed prior to the hospital admission (comorbid diabetes) while 49 (9.6%) had diabetes diagnosed at the time of admission (newly diagnosed). Diabetes was associated with increased levels of inflammatory biomarkers and hypercoagulopathy, as well as leucocytosis and neutrophilia. Diabetes was independently associated with risk of death (HR 2.32 [95% CI 1.44, 3.75], p = 0.001), even after adjustment for age, sex and other relevant comorbidities. Moreover, a strong association between higher glucose levels and risk of death was documented irrespective of diabetes diagnosis (HR 1.14 × 1.1 mmol/l [95% CI 1.08, 1.21], p < 0.001). The humoral response against SARS-CoV-2 in patients with diabetes was present and superimposable, as for timing and antibody titres, to that of non-diabetic patients, with marginal differences, and was not influenced by glucose levels. Of the measured antibody responses, positivity for IgG against the SARS-CoV-2 spike receptor-binding domain (RBD) was predictive of survival rate, both in the presence or absence of diabetes. Conclusions/interpretation The observed increased severity and mortality risk of COVID-19 pneumonia in patients with hyperglycaemia was not the result of an impaired humoral response against SARS-CoV-2. RBD IgG positivity was associated Electronic supplementary material The online version of this article (