A new transform method for solving initial boundary value problems for linear and for integrable nonlinear PDEs in two independent variables is introduced. This unified method is based on the fact that linear and integrable nonlinear equations have the distinguished property that they possess a Lax pair formulation. The implementation of this method involves performing a simultaneous spectral analysis of both parts of the Lax pair and solving a Riemann–Hilbert problem. In addition to a unification in the method of solution, there also exists a unification in the representation of the solution. The sine–Gordon equation in light–cone coordinates, the nonlinear Schrödinger equation and their linearized versions are used as illustrative examples. It is also shown that appropriate deformations of the Lax pairs of linear equations can be used to construct Lax pairs for integrable nonlinear equations. As an example, a new Lax pair of the nonlinear Schrödinger equation is derived.