This paper investigates the impact of localization economies on firms' locations. It is known that such external effects lead to substantial cost reductions when firms are located together. However, when they are agglomerated, firms also face the prospects of tough price competition whose intensity can be relaxed through product differentiation. In addition, their access to isolated markets varies with the level of transport costs. As a result, there is a trade-off whose solution depends on the structural parameters of the economy. The market and optimal solutions are compared for the case of small and large groups of firms.