Gene therapy may provide a cure for hemophilia and overcome the limitations of protein replacement therapy. Increasing the potency of gene transfer vectors may allow improvement of their therapeutic index, as lower doses can be administered to achieve therapeutic benefit, reducing toxicity of in vivo administration. Here we generated codon-usage optimized and hyperfunctional factor IX (FIX) transgenes carrying an R338L amino acid substitution (FIX Padua), previously associated with clotting hyperactivity and thrombophilia. We delivered these transgenes to hemophilia B mice by hepatocyte-targeted integration-competent and -defective lentiviral vectors. The hyperfunctional FIX transgenes increased FIX activity reconstituted in the plasma without detectable adverse effects, allowing correction of the disease phenotype at lower vector doses and resulting in improved hemostasis in vivo. The combined effect of codon optimization with the hyperactivating FIX-R338L mutation resulted in a robust 15-fold gain in potency and therefore provides a promising strategy to improve the efficacy, feasibility, and safety of hemophilia gene therapy.