We have measured critical-current densities in micro- and nanometer wide thin-film NbN bridges. These bridges show significant changes in the temperature dependence of the critical-current density depending on the strip width. Taking into account the boundary conditions at the strip edges we can qualitatively describe our data applying a geometric edge-barrier model. We conclude that sub-µm wide bridges remain free of single vortices in ambient magnetic fields and at currents up to the depairing critical-current density. This also means that NbN meanders of superconducting single photon detectors should be free of single vortices under normal operating conditions.