Triggered by the concept of sustainability, the use of natural dyes in batik fabric processing has increased recently. To inhibit fungus growth on batik fabric colored with natural dyes, either clove oil or formaldehyde was added as an antifungal agent. To increase the stability of the interaction between the antifungal agent and the batik fabric, chitosan was used as a crosslinker. A modified version of the standard tests American Association of Textile Chemists and Colorists (AATCC) 30 and Response Surface Methodology (RSM) was applied as the characterization method. The results showed that the growth percentage of fungi in Batik treated with either clove oil or formaldehyde was much lower than that in the control sample. Growth of Aspergillus niger could be prevented by about 32% using clove oil and 94% using formaldehyde. The optimal condition was obtained with 1% chitosan as a crosslinking reagent, 15.91 ppm of formaldehyde, and 60-min immersion time, with absorbance intensity of formaldehyde crosslinking solution and fungus growth areas being 0.159 and 2.47%, respectively.