Chitin nanofibers are widely used in many fields because of their biocompatibility, renewability and excellent mechanical properties. Herein, zwitterionically charged chitin nanofibers (ZC-ChNFs) were prepared from chitin via one step chemical modification (oxalic acid pretreatment) and subsequent ultrasound treatment. Effects of pretreatment time on size of the ZC-ChNFs and pH of ZC-ChNF suspensions on the thickness, porosity, refractive index and antireflective capacity of ZC-ChNF coatings were investigated. It was found that, by adjusting pH of the ZC-ChNF suspension, porosity and refractive index of the ZC-ChNF coatings could be controlled. The ZC-ChNF coatings fabricated with smaller ZC-ChNFs had higher antireflective performance and the transmittance gain of a glass with a ZC-ChNF coating was about 3.5 % at a wavelength of 550 nm compared to the bare glass. The results of this work provide a promising pathway to fabricate antireflective coating with ZC-ChNFs just by controlling the pH of ZC-ChNF suspensions.