Single-stranded structure-specific DNA endonuclease involved in DNA excision repair. Makes the 3'incision in DNA nucleotide excision repair (NER). Binds and bends DNA repair bubble substrate and breaks base stacking at the single-strand/double-strand DNA junction of the DNA bubble. Plays a role in base excision repair (BER) by promoting the binding of DNA glycosylase to its substrate and increasing DNA glycosylase catalytic activity that removes oxidized pyrimidines from DNA. Involved in transcription-coupled nucleotide excision repair (TCR) which allows RNA polymerase II-blocking lesions to be rapidly removed from the transcribed strand of active genes. Required for DNA replication fork maintenance and preservation of genomic stability. Involved in homologous recombination repair (HRR) induced by DNA replication stress. During HRR, binds to the replication fork with high specificity and stabilizes it. Binds 2 magnesium ions per subunit. They probably participate in the reaction catalyzed by the enzyme. May bind an additional third magnesium ion after substrate binding. Monomer. Homodimer. Both nuclear localization signals 1 and 2 act as a monopartite signal which binds to the high affinity site on importin-alpha. Both the spacer region (also known as the recognition (R) domain) and C-terminal domain are required for stable binding to the DNA repair bubble. However, both domains are dispensable for incision of DNA bubble structures. Belongs to the XPG/RAD2 endonuclease family. XPG subfamily.