When a domain in the plane is specified by the requirement that there exists a harmonic function which is zero on its boundary and additionally satisfies a prescribed Neumann condition there, the boundary is called a Bernoulli free boundary. (The boundary is 'free' because the domain is not known a priori and the name Bernoulli was originally associated with such problems in hydrodynamics.) Questions of existence, multiplicity or uniqueness, and regularity of free boundaries for prescribed data need to be addressed and their solutions lead to nonlinear problems.In this paper an equivalence is established between Bernoulli free-boundary problems and a class of equations for real-valued functions of one real variable. The authors impose no restriction on the amplitudes or shapes of free boundaries, nor on their smoothness. Therefore the equivalence is global, and valid even for very weak solutions. An essential observation here is that the equivalent equations can be written as nonlinear Riemann-Hilbert problems and the theory of complex Hardy spaces in the unit disc has a central role. An additional useful fact is that they have gradient structure, their solutions being critical points of a natural Lagrangian. This means that a canonical Morse index can be assigned to free boundaries and the Calculus of Variations becomes available as a tool for the study. Some rather natural conjectures about the regularity of free boundaries remain unresolved.