In this article nanoscaled polyanilines (PANI) were prepared based on template-free method in the presence of dicarboxylic acid dopants (e.g. D-tartaric acid, succinic acid, maleic acid and fumaric acid). The trans-cis isomerization of butenedioic acid played an important role in the formation of nanostructures from the plane-like to nanofibers, and the PANI doped with maleic acid (MA) had larger diameter, higher crystallinity and conductivity than PANI doped with fumaric acid (FA).