Healthy kidneys filter ∼160 g/day of glucose (∼30% of daily energy intake) under euglycaemic conditions. To prevent valuable energy from being lost in the urine, the proximal tubule avidly reabsorbs filtered glucose up to a limit of ∼450 g/day. When blood glucose levels increase to the point that the filtered load exceeds this limit, the surplus is excreted in the urine. Thus, the kidney provides a safety valve that can prevent extreme hyperglycaemia as long as glomerular filtration is maintained. Most of the capacity for renal glucose reabsorption is provided by sodium glucose cotransporter (SGLT) 2 in the early proximal tubule. In the absence or with inhibition of SGLT2, the renal reabsorptive capacity for glucose declines to ∼80 g/day (the residual capacity of SGLT1), i.e. the safety valve opens at a lower threshold, which makes it relevant to glucose homeostasis from day-to-day. Several SGLT2 inhibitors are now approved glucose lowering agents for individuals with type 2 diabetes and preserved kidney function. By inducing glucosuria, these drugs improve glycaemic control in all stages of type 2 diabetes, while their risk of causing hypoglycaemia is low because they naturally stop working when the filtered glucose load falls below ∼80 g/day and they do not otherwise interfere with metabolic counterregulation. Through glucosuria, SGLT2 inhibitors reduce body weight and body fat, and shift substrate utilisation from carbohydrates to lipids and, possibly, ketone bodies. Because SGLT2 reabsorbs sodium along with glucose, SGLT2 blockers are natriuretic and antihypertensive. Also, because they work in the proximal tubule, SGLT2 inhibitors increase delivery of fluid and electrolytes to the macula densa, thereby activating tubuloglomerular feedback and increasing tubular back pressure. This mitigates glomerular hyperfiltration, reduces the kidney's demand for oxygen and lessens albuminuria. For reasons that are less well understood, SGLT2 inhibitors are also uricosuric. These pleiotropic effects of SGLT2 inhibitors are likely to have contributed to the results of the EMPA-REG OUTCOME trial in which the SGLT2 inhibitor, empagliflozin, slowed the progression of chronic kidney disease and reduced major adverse cardiovascular events in high-risk individuals with type 2 diabetes. This review discusses the role of SGLT2 in the physiology and pathophysiology of renal glucose reabsorption and outlines the unexpected logic of inhibiting SGLT2 in the diabetic kidney.