Previous studies suggested that postsynaptic neuroligins form a trans-synaptic complex with presynaptic β-neurexins, but not with presynaptic α-neurexins. Unexpectedly, we now find that neuroligins also bind α-neurexins and that α- and β-neurexin binding by neuroligin 1 is regulated by alternative splicing of neuroligin 1 (at splice site B) and of neurexins (at splice site 4). In neuroligin 1, splice site B is a master switch that determines α-neurexin binding but leaves β-neurexin binding largely unaffected, whereas alternative splicing of neurexins modulates neuroligin binding. Moreover, neuroligin 1 splice variants with distinct neurexin binding properties differentially regulate synaptogenesis: neuroligin 1 that binds only β-neurexins potently stimulates synapse formation, whereas neuroligin 1 that binds to both α- and β-neurexins more effectively promotes synapse expansion. These findings suggest that neuroligin binding to α- and β-neurexins mediates trans-synaptic cell adhesion but has distinct effects on synapse formation, indicating that expression of different neuroligin and neurexin isoforms specifies a trans-synaptic signaling code.