Natural coagulants provide a safe and sustainable alternative for water treatment. Our study used shrimp shell-derived chitosan combined with xanthan gum to remove malachite green dye from water. Using a Box-Behnken design, we optimized parameters, achieving up to 99.7 % dye removal under optimal conditions: chitosan (1.75 mg/L), xanthan gum (1.73 %–3.0 %), dye (5–27.5 mg/L), pH 6.0, stirring period (5–7.5 min), and stirring rate (105 rpm). Key factors affecting sedimentation included xanthan gum dosage and its interactions with pH and stirring rate. SEM and FT-IR analyses characterized dye-polymer interactions. Pilot-scale tests on aquaculture wastewater showed significant turbidity reduction and enhanced dye removal in 15 L volumes. Toxicity assessments post remediation was performed on Artemia salina as a model organism and hatching efficiency and survival were essential parameters studied. Our findings highlight the potential for sustainable dye recovery and reuse in wastewater treatment.