Polyaniline nanofibers are synthesized via controlled chemical oxidative polymerization. The interconnected, branched network-like nanostructures are demonstrated through scanning electron microscopy (SEM). Using different synthetic conditions as well as different dopant acids we can control the diameters of polyaniline nanofibers ranging from 30nm to 80nm. UV/vis spectra of polyaniline nanofibers are consistent with nonfibrous polyaniline powders prepared by the conventional chemical synthesis. The nanofibrous morphology has no significant change when redoped/dedoped multiple times by the acid/base solutions. The formation mechanism of the nanofibers is discussed.