We find a sufficient condition to imprint the single-mode bosonic phase-space nonclassicality onto a bipartite state as modal entanglement and vice versa using an arbitrary beam splitter. Surprisingly, the entanglement produced or detected in this way depends only on the nonclassicality of the marginal input or output states, regardless of their purity and separability. In this way, our result provides a sufficient condition for generating entangled states of arbitrary high temperature and arbitrary large number of particles. We also study the evolution of the entanglement within a lossy Mach-Zehnder interferometer and show that unless both modes are totally lost, the entanglement does not diminish.