We consider the problem of minimizing the bending or elastic energy among Jordan curves confined in a given open set Ω. We prove existence, regularity and some structural properties of minimizers. In particular, when Ω is convex we show that a minimizer is necessarily a convex curve. We also provide an example of a minimizer with self-intersections.