mRNAs enriched in membraneless condensates provide functional compartmentalization within cells. How mRNAs sort and organize within these condensates is poorly understood. Here, we report on a self-sorting mechanism by which multiple mRNAs derived from the same gene assemble into homotypic mRNA clusters. In Drosophila germ granules, clusters formed by mRNAs originating from different genes are de-mixed from each other within the same granule and located at distinct positions within the homogeneously-distributed protein environment of the granule. The specificity for self-sorting is not dependent on any particular RNA sequence and the intermolecular RNA:RNA interactions among clustered mRNAs are transient. We propose that the ability of mRNAs to self-sort into homotypic assemblies is their inherent property that is augmented under conditions that increase local mRNA concentration, such as upon enrichment in RNA-protein condensates, a process that appears conserved in diverse cellular contexts and organisms.