It is unclear whether transgender and gender-diverse individuals have elevated rates of autism diagnosis or traits related to autism compared to cisgender individuals in large non-clinic-based cohorts. To investigate this, we use five independently recruited cross-sectional datasets consisting of 641,860 individuals who completed information on gender, neurodevelopmental and psychiatric diagnoses including autism, and measures of traits related to autism (self-report measures of autistic traits, empathy, systemizing, and sensory sensitivity). Compared to cisgender individuals, transgender and gender-diverse individuals have, on average, higher rates of autism, other neurodevelopmental and psychiatric diagnoses. For both autistic and non-autistic individuals, transgender and gender-diverse individuals score, on average, higher on self-report measures of autistic traits, systemizing, and sensory sensitivity, and, on average, lower on self-report measures of empathy. The results may have clinical implications for improving access to mental health care and tailoring adequate support for transgender and gender-diverse individuals. It is unclear if rates of autism and other neurodevelopmental and psychiatric diagnoses are elevated in transgender and gender-diverse individuals compared to cisgender individuals. Here, the authors use data from five different large-scale datasets to identify elevated rates of autism diagnoses, diagnoses of other neurodevelopmental and psychiatric conditions, and elevated traits related to autism in transgender and gender-diverse individuals, compared to cisgender individuals.