Broad substrate specificity ATP-dependent transporter of the ATP-binding cassette (ABC) family that actively extrudes a wide variety of physiological compounds, dietary toxins and xenobiotics from cells (PubMed:11306452, PubMed:12958161, PubMed:19506252, PubMed:20705604, PubMed:28554189, PubMed:30405239, PubMed:31003562). Involved in porphyrin homeostasis, mediating the export of protoporphyrin IX (PPIX) from both mitochondria to cytosol and cytosol to extracellular space, it also functions in the cellular export of heme (PubMed:20705604, PubMed:23189181). Also mediates the efflux of sphingosine-1-P from cells (PubMed:20110355). Acts as a urate exporter functioning in both renal and extrarenal urate excretion (PubMed:19506252, PubMed:20368174, PubMed:22132962, PubMed:31003562, PubMed:36749388). In kidney, it also functions as a physiological exporter of the uremic toxin indoxyl sulfate (By similarity). Also involved in the excretion of steroids like estrone 3-sulfate/E1S, 3beta-sulfooxy-androst-5-en-17-one/DHEAS, and other sulfate conjugates (PubMed:12682043, PubMed:28554189, PubMed:30405239). Mediates the secretion of the vitamins riboflavin and biotin into milk (By similarity). Involved in the excretion of the riboflavin-derived compound lumichrome into the intestinal lumen and in its secretion into milk (PubMed:39337371). Extrudes pheophorbide a, a phototoxic porphyrin catabolite of chlorophyll, reducing its bioavailability (By similarity). Plays an important role in the exclusion of xenobiotics from the brain (Probable). It confers to cells a resistance to multiple drugs and other xenobiotics including mitoxantrone, pheophorbide, camptothecin, methotrexate, azidothymidine, and the anthracyclines daunorubicin and doxorubicin, through the control of their efflux (PubMed:11306452, PubMed:12477054, PubMed:15670731, PubMed:18056989, PubMed:31254042). In placenta, it limits the penetration of drugs from the maternal plasma into the fetus (By similarity). May play a role in early stem cell self-renewal by blocking differentiation (By similarity). In inflammatory macrophages, exports itaconate from the cytosol to the extracellular compartment and limits the activation of TFEB-dependent lysosome biogenesis involved in antibacterial innate immune response. {ECO:0000250|UniProtKB:Q7TMS5, ECO:0000269|PubMed:11306452, ECO:0000269|PubMed:12477054, ECO:0000269|PubMed:12682043, ECO:0000269|PubMed:12958161, ECO:0000269|PubMed:15670731, ECO:0000269|PubMed:18056989, ECO:0000269|PubMed:19506252, ECO:0000269|PubMed:20110355, ECO:0000269|PubMed:20368174, ECO:0000269|PubMed:20705604, ECO:0000269|PubMed:22132962, ECO:0000269|PubMed:23189181, ECO:0000269|PubMed:28554189, ECO:0000269|PubMed:30405239, ECO:0000269|PubMed:31003562, ECO:0000269|PubMed:31254042, ECO:0000269|PubMed:38181789, ECO:0000269|PubMed:39337371, ECO:0000305|PubMed:12958161}. This is the function of ABCG2 (ATP binding cassette subfamily G member 2 (JR blood group), Ensembl gene identifier ENSG00000118777).