The skin-penetrating gastrointestinal parasitic nematode Strongyloides stercoralis causes strongyloidiasis, which is a neglected tropical disease that is associated with severe chronic illness and fatalities. Unlike other human-infective nematodes, S. stercoralis cycles through a single free-living generation and thus serves as a genetically tractable model organism for understanding the mechanisms that enable parasitism. Techniques such as CRISPR/Cas9-mediated mutagenesis and transgenesis are now routinely performed in S. stercoralis by introducing exogenous DNA into free-living adults and then screening their F1 progeny for transgenic or mutant larvae. However, transgenesis in S. stercoralis has been severely hindered by the inability to establish stable transgenic lines that can be propagated for multiple generations through a host; to date, studies of transgenic S. stercoralis have been limited to heterogeneous populations of transgenic F1 larvae. Here, we develop an efficient pipeline for the generation of stable transgenic lines in S. stercoralis. We also show that this approach can be used to efficiently generate stable transgenic lines in the rat-infective nematode Strongyloides ratti. The ability to generate stable transgenic lines circumvents the limitations of working with heterogeneous F1 populations, such as variable transgene expression and the inability to generate transgenics of all life stages. Our transgenesis approach will enable novel lines of inquiry into parasite biology, such as transgene-based comparisons between free-living and parasitic generations.