Dioxygenase that repairs alkylated DNA and RNA containing 3-methylcytosine or 1-methyladenine by oxidative demethylation. Has highest activity towards 3-methylcytosine. Has lower activity towards alkylated DNA containing ethenoadenine, and no detectable activity towards 1-methylguanine or 3-methylthymine. Accepts double-stranded and single-stranded substrates. Requires molecular oxygen, alpha-ketoglutarate and iron. Provides extensive resistance to alkylating agents such as MMS and DMS (SN2 agents), but not to MMNG and MNU (SN1 agents). 2-oxoglutarate + a methylated nucleobase within DNA + O2 = a nucleobase within DNA + CO2 + formaldehyde + succinate Binds 1 Fe(2+) ion per subunit. Belongs to the alkB family.