We examined the distribution of endophytic fungi in the leaves of mangrove forest trees growing at three different locations (Chanthaburi Province, Prachuap Khiri Khan Province and Ranong Province) in Thailand. Three thousand and nine-hundred leaf segments from 10 different hosts belonging to seven families, Rhizophoraceae (Rhizophora apiculata, R. mucronata, Ceriops decandra), Sonneratiaceae (Sonneratia alba), Combretaceae (Lumnitzera littorea), Avicenniaceae (Avicennia alba), Acanthaceae (Acanthus ilicifolius), Meliaceae (Xylocarpus granatum and Xylocarpus moluccensis) and Malvaceae (Thespesia populneoides), were screened for the presence of fungal endophytes. The dominant endophytes varied by host type. Phyllosticta was the most frequently isolated fungus from plants at all sites. The common fungal endophyte genera were Cladosporium, Colletotrichum, Phomopsis and Xylaria. Most endophytic isolates in mangrove leaves were recovered from Ranong Province. The antimicrobial potential of 71 endophytic fungi isolated from mangrove plants towards selected bacteria (Bacillus subtilis, Pseudomonas aeruginosa, Escherichia coli and Staphylococcus aureus) was tested using ethyl acetate extracts of fungi cultivated under static conditions. All test bacteria were inhibited by a Cladosporium sp. isolated from the leaves of T. populneoides and an endophytic Xylaria sp. 1 isolated from A. ilicifolius leaves caused considerable inhibition to Gram-positive and Gram-negative bacteria. Additionally, the crude extracts of 84 endophytic fungi were tested for anticancer activities by the MTT assay against A375 (human malignant melanoma), SW620 (human colorectal adenocarcinoma), Kato III (human gastric carcinoma), HepG2 (human liver hepatoblastoma) and Jurkat (human acute T cell leukemia). Most extracts had cytotoxicity against some cancer cell lines.