The Nernst effect in metals is highly sensitive to two kinds of phase transition: superconductivity and density-wave order. The large positive Nernst signal observed in hole-doped high-Tc superconductors above their transition temperature Tc has so far been attributed to fluctuating superconductivity. Here we show that in some of these materials the large Nernst signal is in fact caused by stripe order, a form of spin / charge modulation which causes a reconstruction of the Fermi surface. In LSCO doped with Nd or Eu, the onset of stripe order causes the Nernst signal to go from small and negative to large and positive, as revealed either by lowering the hole concentration across the quantum critical point in Nd-LSCO, or lowering the temperature across the ordering temperature in Eu-LSCO. In the latter case, two separate peaks are resolved, respectively associated with the onset of stripe order at high temperature and superconductivity near Tc. This sensitivity to Fermi-surface reconstruction makes the Nernst effect a promising probe of broken symmetry in high-Tc superconductors.