mRNA localization coupled with translational control is a highly conserved and widespread mechanism for restricting protein expression to specific sites within eukaryotic cells. In Drosophila, patterning of the embryo requires oskar mRNA transport to the posterior pole of the oocyte and translational repression prior to localization. oskar RNA splicing and the 3' untranslated region (UTR) are required for posterior enrichment of the mRNA. However, reporter RNAs harboring the oskar 3' UTR can localize by hitchhiking with endogenous oskar transcripts. Here we show that the oskar 3' UTR contains a stem-loop structure that promotes RNA dimerization in vitro and hitchhiking in vivo. Mutations in the loop that abolish in vitro dimerization interfere with reporter RNA localization, and restoring loop complementarity restores hitchhiking. Our analysis provides insight into the molecular basis of RNA hitchhiking, whereby localization-incompetent RNA molecules can become locally enriched in the cytoplasm, by virtue of their association with transport-competent RNAs.