Transcription factor that acts as a key regulator of spermatogenesis (PubMed:26248850, PubMed:26162102, PubMed:26853561). Acts by regulating expression of genes required for the haploid phase during spermiogenesis, such as genes required for cilium assembly and function (PubMed:26162102, PubMed:26853561). Recognizes and binds the X-box, a regulatory motif with DNA sequence 5'-GTNRCC(0-3N)RGYAAC-3' present on promoters (PubMed:15229132, PubMed:26162102). Probably activates transcription of the testis-specific histone gene H1-6 (PubMed:15229132). Homodimer; probably only forms homodimers in testis (PubMed:15229132). Heterodimer; heterodimerizes with RFX1 and RFX3 (PubMed:15229132). Mainly expressed in the nucleus and at lower level in cytoplasm. Detected in the anterior primitive streak preceding the morphological appearance of the node at 7.0 dpc. Expressed in the node and in the midline notochordal plate cells extending anteriorly from the node at 7.5 dpc. At 8.5 dpc, expressed in the node now located in the tail region. At 9.5 dpc, detected in the floor plate and in the dorsal portion of the neural tube, with highest expression in the anterior portion of the spinal cord. Also expressed in the developing gut. At 10.5 dpc, also observed in the telencephalon region of the brain and in the anterior portion of the limb bud at 12.5 dpc (PubMed:26248850). Localizes to cells at the posterior margin of the ciliated organ of asymmetry (PubMed:22233545). Mice are perfectly viable but show complete male sterility (PubMed:26248850, PubMed:26162102, PubMed:26853561). Spermatogenesis proceeds normally through meiosis. However, haploid cells undergo a complete arrest in spermatid development before spermatid elongation (PubMed:26248850, PubMed:26162102). Arrested cells show altered Golgi apparatus organization, leading to a deficit in the generation of a spreading acrosomal cap from proacrosomal vesicles and merge to form giant multinucleated cells released to the epididymis. Spermatids also completely fail to form the flagellar axoneme (PubMed:26162102). Belongs to the RFX family.