The invention relates to a device for self-retracting leashes having adjustable leash length and intended for walking and/or training of dogs and other animals. A retractable leash has been developed which comprises a housing containing a spring-loaded spool having a leash wound thereon and a device for controlling the length of the leash, comprising at least one means for locking the movement of the spool, wherein the device for controlling the length of the leash comprises a device for determining the movement of the spool, an electronic device linked thereto for controlling said means for locking the movement of the spool, a device for activating and deactivating the electronic device for controlling the means for locking the movement of the spool, at least one actuator of the means for locking the movement of the spool, said actuator being connected to the device for controlling the means for locking the movement of the spool, and at least one power supply.