ObjectivesTo estimate the prevalence of long COVID symptoms in children with and without a history of SARS-CoV-2 infection and to evaluate factors associated with long COVID.DesignA nationwide cross-sectional study.SettingPrimary care.Participants3240 parents of children aged 5–18 with and without SARS-CoV-2 infection completed an online questionnaire (11.9% response rate); 1148 and 2092 with/without a history of infection, respectively.Primary and secondary outcome measuresPrimary outcome was the prevalence of long COVID symptoms in children with/without a history of infection. Secondary outcomes were the factors associated with the presence of long COVID symptoms and with failure to return to baseline health status in children with a history of infection including gender, age, time from illness, symptomatic illness and vaccine status.ResultsMost long COVID symptoms were more prevalent in children with a history of SARS-CoV-2 infection: headaches (211 (18.4%) vs 114 (5.4%), p<0.001), weakness (173 (15.1%) vs 70 (3.3%), p<0.001), fatigue (141 (12.3%) vs 133 (6.4%), p<0.001) and abdominal pain (109 (9.5%) vs 79 (3.8%), p<0.001). Most long COVID symptoms in children with a history of SARS-CoV-2 infection were more prevalent in the older age group (12–18) compared with the younger age group (5–11). Some symptoms were more prevalent in children without a history of SARS-CoV-2 infection, including attention problems with school malfunctioning (225 (10.8%) vs 98 (8.5%), p=0.05), stress (190 (9.1%) vs 65 (5.7%), p<0.001), social problems (164 (7.8%) vs 32 (2.8%)) and weight changes (143 (6.8%) vs 43 (3.7%), p<0.001).ConclusionThis study suggests that the prevalence of long COVID symptoms in children with a history of SARS-CoV-2 infection might be higher and more prevalent in adolescents than in young children. Some of the symptoms, mainly somatic symptoms, were more prevalent in children without a history of SARS-CoV-2 infection, highlighting the impact of the pandemic itself rather than the infection.