A novel, flexible lead-free piezoelectric nanogenerator was developed using a uniform BaTiO3 film; synthesized by in situ conversion of titanium oxide nanotubes in a low temperature hydrothermal process.