How to secure data communication is an important problem in wireless sensor networks (WSNs). General solutions to the problem are to encrypt the packet payload with symmetric keys. But those solutions only prevent the packet content from being snooped or tampered. Adversaries still can learn network topology by the traffic analysis attack. In this paper, we propose an anonymous path routing (APR) protocol for WSNs. In APR, data are encrypted by pair-wise keys and transmitted with anonyms between neighboring sensor nodes and anonyms between the source and destination nodes of a multi-hop communication path. The encryption prevents adversaries from disclosing the data, and the anonymous communication prevents adversaries from observing the relation of the packets for further attacks. We implement APR on the MICAz platform to evaluate its overheads for demonstrating its applicability in practical WSNs.