We explore the phase diagram of the O(n) loop model on the square lattice in the (x, n) plane, where x is the weight of a lattice edge covered by a loop. These results are based on transfer-matrix calculations and finite-size scaling. We express the correlation length associated with the staggered loop density in the transfer-matrix eigenvalues. The finite-size data for this correlation length, combined with the scaling formula, reveal the location of critical lines in the diagram. For n >> 2 we find Ising-like phase transitions associated with the onset of a checkerboardlike ordering of the elementary loops, i.e., the smallest possible loops, with the size of an elementary face, which cover precisely one-half of the faces of the square lattice at the maximum loop density. In this respect, the ordered state resembles that of the hard-square lattice gas with nearest-neighbor exclusion, and the finiteness of n represents a softening of its particle-particle potentials. We also determine critical points in the range -2 <= n <= 2. It is found that the topology of the phase diagram depends on the set of allowed vertices of the loop model. Depending on the choice of this set, the n > 2 transition may continue into the dense phase of the n <= 2 loop model, or continue as a line of n <= 2 O(n) multicritical points.