Recent empirical evidence suggests that financial networks exhibit a core periphery network structure. This paper aims at giving an economic explanation for the emergence of such a structure using network formation theory. Focusing on intermediation benefits, we find that a core periphery network cannot be unilaterally stable when agents are homogeneous. The best-response dynamics converge to a unique unilaterally stable outcome ranging from an empty to denser networks as the costs of linking decrease. A core periphery network structure can form endogenously, however, if we allow for heterogeneity among agents in size. We show that our model can reproduce the observed core periphery structure in the Dutch interbank market for reasonable parameter values.