We classify the hypersurfaces of Euclidean space that carry a totally geodesic foliation with complete leaves of codimension one. In particular, we show that rotation hypersurfaces with complete profiles of codimension one are characterized by their warped product structure. The local version of the problem is also considered.