Mammalian sex determination is the unique process whereby a single organ, the bipotential gonad, undergoes a developmental switch that promotes its differentiation into either a testis or an ovary. Disruptions of this complex genetic process during human development can manifest as disorders of sex development (DSDs). Sex development can be divided into two distinct processes: sex determination, in which the bipotential gonads form either testes or ovaries, and sex differentiation, in which the fully formed testes or ovaries secrete local and hormonal factors to drive differentiation of internal and external genitals, as well as extragonadal tissues such as the brain. DSDs can arise from a number of genetic lesions, which manifest as a spectrum of gonadal (gonadal dysgenesis to ovotestis) and genital (mild hypospadias or clitoromegaly to ambiguous genitalia) phenotypes. The physical attributes and medical implications associated with DSDs confront families of affected newborns with decisions, such as gender of rearing or genital surgery, and additional concerns, such as uncertainty over the child's psychosexual development and personal wishes later in life. In this Review, we discuss the underlying genetics of human sex determination and focus on emerging data, genetic classification of DSDs and other considerations that surround gender development and identity in individuals with DSDs.