Neurite self-recognition and avoidance are fundamental properties of all nervous systems1. These processes facilitate dendritic arborization2,3, prevent formation of autapses4 and allow free interaction among non-self neurons1,2,4,5. Avoidance among self neurites is mediated by stochastic cell-surface expression of combinations of about 60 isoforms of α-, β- and γ-clustered protocadherin that provide mammalian neurons with single-cell identities1,2,4-13. Avoidance is observed between neurons that express identical protocadherin repertoires2,5, and single-isoform differences are sufficient to prevent self-recognition10. Protocadherins form isoform-promiscuous cis dimers and isoform-specific homophilic trans dimers10,14-20. Although these interactions have previously been characterized in isolation15,17-20, structures of full-length protocadherin ectodomains have not been determined, and how these two interfaces engage in self-recognition between neuronal surfaces remains unknown. Here we determine the molecular arrangement of full-length clustered protocadherin ectodomains in single-isoform self-recognition complexes, using X-ray crystallography and cryo-electron tomography. We determine the crystal structure of the clustered protocadherin γB4 ectodomain, which reveals a zipper-like lattice that is formed by alternating cis and trans interactions. Using cryo-electron tomography, we show that clustered protocadherin γB6 ectodomains tethered to liposomes spontaneously assemble into linear arrays at membrane contact sites, in a configuration that is consistent with the assembly observed in the crystal structure. These linear assemblies pack against each other as parallel arrays to form larger two-dimensional structures between membranes. Our results suggest that the formation of ordered linear assemblies by clustered protocadherins represents the initial self-recognition step in neuronal avoidance, and thus provide support for the isoform-mismatch chain-termination model of protocadherin-mediated self-recognition, which depends on these linear chains11.