Heavy metal pollution is an environmental issue globally and the aim of this study was to isolate endophytic fungi from mangrove wetlands of Sarawak to assess and test their ability to grow in the presence of various heavy metals (copper (Cu), zinc (Zn), lead (Pb), and chromium (Cr)). Samples of Nypa fruticans were collected from Kuching Wetland National Park (KWNP) for subsequent endophyte isolation. Ninety-three (93) isolates were obtained and assessed and the most resistant isolates (growing at concentrations up to 1000 ppm) were identified using fungal primers ITS 1 and ITS 4. All of the endophytic fungi were identified to be closely related to Pestalotiopsis sp. and this is to our knowledge the first study reporting the ability of Pestalotiopsis sp. to grow at high concentrations of copper, lead, zinc and chromium. Our results highlight the potential of using endophytic fungi for the treatment of heavy metal pollution, for example as biosorbents.