We derive the distribution of eigenvalues of the reduced density matrix of a block of length l in a one-dimensional system in the scaling regime. The resulting "entanglement spectrum" is described by a universal scaling function depending only on the central charge of the underlying conformal field theory. This prediction is checked against exact results for the XX chain. We also show how the entanglement gap closes when l is large.