Toll-like receptor 7 (TLR7) mediates innate responses by responding to viral RNA in endocytic compartments. However, the molecular pattern recognised by TLR7 and whether it differs between RNA of viral and self origin remains unclear. Here, we identify nucleic acids that act as TLR7 agonists for mouse and human cells. We show that uridine and ribose, the two defining features of RNA, are both necessary and sufficient for TLR7 stimulation, and that short single-stranded RNA (ssRNA) act as TLR7 agonists in a sequence-independent manner as long as they contain several uridines in close proximity. Consistent with the notion that TLR7 lacks specificity for sequence motifs, we show that it is triggered equally efficiently by viral or self RNA delivered to endosomes. Our results support the notion that TLR7 recognises uracil repeats in RNA and that it discriminates between viral and self ligands on the basis of endosomal accessibility rather than sequence.