An anti-tangling device includes a headphone cord having a distal end, a male signal plug at the distal end, a proximal end, and at least one earphone at the proximal end. Each of the plug and the earphone has first or second parts of a two-part connection device. The two-part connection device removably secures the plug and the earphone to one another. In an embodiment, the plug is the first part and the earphone has a plug-in portion as the second part. The plug-in portion defines a female port shaped to removably secure the plug therein and, when secured, forms a continuous loop with the cord, the plug, and the earphone. The plug-in portion can be integral with or removably attached to the earphone. The first and second parts can be a magnet and a magnetized piece, a hook-and-loop type fastener, or parts of a press-fit snap fastener.