Mean-field games (MFGs) are models for large populations of competing rational agents that seek to optimize a suitable functional. In the case of congestion, this functional takes into account the difficulty of moving in high-density areas. Here, we study stationary MFGs with congestion with quadratic or power-like Hamiltonians. First, using explicit examples, we illustrate two main difficulties: the lack of classical solutions and the existence of areas with vanishing density. Our main contribution is a new variational formulation for MFGs with congestion. This formulation was not previously known, and, thanks to it, we prove the existence and uniqueness of solutions. Finally, we consider applications to numerical methods.