Heparin is primarily used to prevent and treat blood clots, especially in cases where the patient is at risk of developing clots inside the blood vessels. The drug is often given to people who have undergone major surgery such as open-heart surgery or organ transplantation, to avoid clots during and after the procedure.
Heparin is also used to prevent clots associated with other medical conditions such as long hospital stays, central venous catheterization, or treatment of pulmonary embolism. It is sometimes prescribed to treat and prevent deep vein thrombosis (DVT) in individuals with known risk factors.