A safety device is provided for needles used with intravenous catheters and the like. The safety device includes a top part and a bottom part, wherein the bottom part and the top part can be coupled with each other. The top part includes at least one split end and a gripping rib, whereas the bottom part includes a clip and a spring. Split ends and gripping ribs of the top part makes the safety device move on the needle till the tip of the needle has retracted within the bottom part of the safety device. Thereafter the clip and the spring housed in the bottom part lock the needle tip within a safety chamber defined by top and bottom legs of the clip.