Comparison Between Heparin and Warfarin While heparin and warfarin are both anticoagulants, heparin provides an immediate response, while warfarin is generally used for long-term treatment, according to Johns Hopkins Medicine. Heparin is an injection, while warfarin is an oral medication.