Artificial intelligence can help classify plants to make identification easier for everyone. This technology can be used to classify mangrove trees. The degradation of mangrove forests has resulted in a 20% loss of biodiversity, an 80% loss of microbial decomposers, reduced C-organic soil, and fish spawning grounds, resulting in estimated losses in the ecological and economic fields for up to IDR 39 billion. The identification of different mangrove species is the first step in ensuring the preservation of these forests. Therefore, this research aimed to develop algorithms and a convolutional neural network (CNN) architecture to classify mangrove tree species with the highest possible accuracy using Python software. The architecture selection for this model includes a batch size of 32, an input image size of 128x128 pixels, four classes, four convolution layers, four rectified linear unit (ReLU) layers, 2x2 max-pooling, and two fully connected layers (FCL). The finding showed that the resulting accuracy from the test was 97.50%, while the validation test was 81.25%, applied to four types of mangrove leaves, including <em>Avicenia marina, Avicenia officialis, Rizophora apiculata, </em>and <em>Soneratia caseolaris</em>.