Identifying the requirements for the regulatory HBx protein in hepatitis B virus (HBV) replication is an important goal. A plasmid-based HBV replication assay was used to evaluate whether HBx subcellular localization influences its ability to promote virus replication, as measured by real time PCR quantitation of viral capsid-associated DNA. HBx targeted to the nucleus by a nuclear localization signal (NLS-HBx) was able to restore HBx-deficient HBV replication, while HBx containing a nuclear export signal (NES-HBx) was not. Both NLS-HBx and NES-HBx were expressed at similar levels (by immunoprecipitation and Western blotting), and proper localization of the signal sequence-tagged proteins was confirmed by deconvolution microscopy using HBx, NLS-HBx, and NES-HBx proteins fused to GFP. Importantly, these findings were confirmed in vivo by hydrodynamic injection into mice. Our results demonstrate that in these HBV replication assays, at least one function of HBx requires its localization to the nucleus.