We investigate the monodromy of the Lax connection for classical IIB superstrings on AdS_5xS^5. For any solution of the equations of motion we derive a spectral curve of degree 4+4. The curve consists purely of conserved quantities, all gauge degrees of freedom have been eliminated in this form. The most relevant quantities of the solution, such as its energy, can be expressed through certain holomorphic integrals on the curve. This allows for a classification of finite gap solutions analogous to the general solution of strings in flat space. The role of fermions in the context of the algebraic curve is clarified. Finally, we derive a set of integral equations which reformulates the algebraic curve as a Riemann-Hilbert problem. They agree with the planar, one-loop N=4 supersymmetric gauge theory proving the complete agreement of spectra in this approximation.