Voltage‐gated sodium channels, including NaV1.7, NaV1.8, and NaV1.9, play important roles in pain transmission and chronic pain development. However, the specific mechanisms of their action remain unclear, highlighting the need for in vivo stimulation studies of these channels. Optogenetics, a novel technique for targeting the activation or inhibition of specific neural circuits using light, offers a promising solution. In our previous study, we used optogenetics to selectively excite NaV1.7‐expressing neurons in the dorsal root ganglion of mice to induce nocifensive behavior. Here, we further characterize the impact of nocifensive behavior by activation of NaV1.7, NaV1.8, or NaV1.9‐expressing neurons. Using CRISPR/Cas9‐mediated homologous recombination, NaV1.7–iCre, NaV1.8–iCre, or NaV1.9–iCre mice expressing iCre recombinase under the control of the endogenous NaV1.7, NaV1.8, or NaV1.9 gene promoter were produced. These mice were then bred with channelrhodopsin‐2 (ChR2) Cre–reporter Ai32 mice to obtain NaV1.7–ChR2, NaV1.8–ChR2, or NaV1.9–ChR2 mice. Blue light exposure triggered paw withdrawal in all mice, with the strongest response in NaV1.8–ChR2 mice. These light sensitivity differences observed across NaV1.x–ChR2 mice may be dependent on ChR2 expression or reflect the inherent disparities in their pain transmission roles. In conclusion, we have generated noninvasive pain models, with optically activated peripheral nociceptors. We believe that studies using optogenetics will further elucidate the role of sodium channel subtypes in pain transmission.