DNA glycosylase that plays a key role in active DNA demethylation: specifically recognizes and binds 5-formylcytosine (5fC) and 5-carboxylcytosine (5caC) in the context of CpG sites and mediates their excision through base-excision repair (BER) to install an unmethylated cytosine. Cannot remove 5-hydroxymethylcytosine (5hmC). According to an alternative model, involved in DNA demethylation by mediating DNA glycolase activity toward 5-hydroxymethyluracil (5hmU) produced by deamination of 5hmC. Also involved in DNA repair by acting as a thymine-DNA glycosylase that mediates correction of G/T mispairs to G/C pairs: in the DNA of higher eukaryotes, hydrolytic deamination of 5-methylcytosine to thymine leads to the formation of G/T mismatches. Its role in the repair of canonical base damage is however minor compared to its role in DNA demethylation. It is capable of hydrolyzing the carbon-nitrogen bond between the sugar-phosphate backbone of the DNA and a mispaired thymine. In addition to the G/T, it can remove thymine also from C/T and T/T mispairs in the order G/T >> C/T > T/T. It has no detectable activity on apyrimidinic sites and does not catalyze the removal of thymine from A/T pairs or from single-stranded DNA. It can also remove uracil and 5-bromouracil from mispairs with guanine. Hydrolyzes mismatched double-stranded DNA and polynucleotides, releasing free thymine. Homodimer. Interacts with AICDA and GADD45A. Sumoylation on Lys-330 by either SUMO1 or SUMO2 induces dissociation of the product DNA. Belongs to the uracil-DNA glycosylase (UDG) superfamily. TDG/mug family.