Polyaniline nanofibers have been successfully synthesized using Lutrol F 127 (Poloxamer 407) and Gelatin gel template. In both the cases nanofibers offer adequate stability and suitability for different applications. A rapid polymerization technique was successfully employed to synthesize interconnected polyaniline (PANI) nanofibers using chemical oxidative polymerization inside a soft template. The thermoreversible hydrogels of Lutrol F 127 and gelatin were used as templates where the interstices present in the hydrogel were responsible for the formation of PANI nanofibers with a diameter in the range ca 70-75 nm and ca 50-55 nm respectively and several micrometers in length. The doped emeraldine salt of PANI was confirmed by Fourier transform infrared spectroscopy and ultraviolet-visible spectroscopy. The crystallinity of as-synthesized PANI nanofibers for both cases was verified by an X-ray diffraction study while thermogravimetric analysis was performed to compare the relative stability of the synthesized PANI nanofibers. The electrical conductivities of polymerized PANI are of the order of 10-3 S cm-1 and are compared with those of template fabricated PANI. The Lutrol F 127 gel guided PANI nanofibers showed a rectifying property while the gelatin gel guided PANI provided a simple ohmic nature. © 2013 Society of Chemical Industry.