Abstract Two-dimensional (2D) materials are attracting significant attention for their potential applications in the post-Moore era. In this work, we systematically investigate the effect of strains on the electronic structure, transport and optoelectronic properties of 2D indium nitride (InN) monolayer using density functional theory and non-equilibrium Green’s function methods. The results show that strains can modulate the electronic properties. Specifically, biaxial strain triggers the transition from semiconductor to metal and indirect to direct band gap. On this basis, the constructed InN-based nanodevice exhibits current switching ratios up to 10^10. In addition, the optoelectronic device based on InN monolayer exhibits a robust photoelectric response in the red light. Meanwhile, biaxial strain can improve the optoelectronic performance of InN-based optoelectronic devices. The compressive strains blue-shift the photocurrent peaks of the InN monolayer, which effectively modulates its detection range in the visible light region. These findings underscore the potential applications in nanotechnology, particularly in nano-switches and optoelectronic devices.