The present study aimed to isolate different pigment-producing bacteria from the mangrove rhizosphere habitat and to extract their pigments for evaluating their antioxidant and sun-protective properties. Three pigment-producing bacterial cultures were isolated from soil samples and were identified by morphological analysis and 16S rDNA sequencing. The pigments were isolated by the solvent extraction method and named as MZ (Pink), Orange, and Yellow. They were characterized by Fourier Transform Infrared (FTIR) and UV-Vis spectroscopy. The sun protection factor (SPF) values of these pigments were then determined using the Mansur equation. The total polyphenol content was estimated by the Folin-Ciocâlteu method, and the antioxidant activity of the pigments was determined using DPPH (2,2-diphenyl-1-picrylhydrazyl), FRAP (ferric reducing antioxidant power), and ABTS (2,2-azinobis-3-ethyl-enzothiazoline-6-sulfonic acid) assays. The
in vitro
antioxidant potential of the pigments in the presence of oxidative stress (H
2
O
2
) was confirmed in the mouse macrophage cell line RAW264.7 by using the MTT (3-(4,5-dimethylthiazol-2-yl)-2,5-diphenyl tetrazolium bromide) assay. The pigment-producing bacterial isolates were identified as
Bacillus infantis
(MZ),
Halomonas
spp. (Orange), and
Bacillus
spp. (Yellow). The pigments were found to be carotenoid in nature, and the SPF values were in the range of 3.99 to 5.22. All three pigments had high polyphenol content (22 to 48 μg tannic acid equivalent) and showed significant antioxidant properties in both chemical and cell line-based studies. The results of this study indicate that these pigments have the potential to be used as an antioxidant agent and can be further developed as a pharmaceutical compound.