Children with autism spectrum disorder or Williams syndrome are vulnerable to anxiety. The factors that contribute to this risk remain unclear. This study compared anxiety in autism spectrum disorder and Williams syndrome and examined the relationship between repetitive behaviours and anxiety. Thirty-four children with autism and twenty children with Williams syndrome were assessed with measures of anxiety and repetitive behaviours. Children with autism had higher levels of anxiety. Within the autism sample higher levels of repetitive behaviours were associated with more anxiety. This was not replicated in the Williams syndrome sample, indicating a differential role for restricted and repetitive behaviours in relation to anxiety. Understanding the links between repetitive behaviours and anxiety is essential for effective intervention.