Canagliflozin is primarily used to improve blood sugar control in adults with type 2 diabetes as part of a treatment plan that includes diet and exercise. It's also used to lower the risk of cardiovascular events like heart attack and stroke in diabetic patients who have existing heart or kidney disease.