The conducting form of polyaniline (PANI) is formed by doping of non‐conducting PANI base usually by protonic acids. An alternative way of doping, consisting in an interaction via hydrogen bonding, has been previously proven for H‐phosphonates. In this study, PANI base films are exposed to various H‐phosphonates, changes in the structure of the films are analyzed by ultraviolet–visible, infrared, and Raman spectroscopies and spectroscopic data are compared with quantum chemical calculations. According to our results, the interaction of the PANI base films with H‐phosphonates is realized by hydrogen bonding between the imine nitrogen of PANI and the hydroxy group of the H‐phosphonate tautomeric form, i.e., phosphite. This is in the contrast to the PANI powders doped with H‐phosphonates where both interacting phosphite and non‐interacting H‐phosphonate forms were observed. © 2018 Wiley Periodicals, Inc. J. Appl. Polym. Sci. 2018, 135, 46728.