In this paper we characterize sparse solutions for variational problems of the form min u∈X φ(u) + F (Au), where X is a locally convex space, A is a linear continuous operator that maps into a finite dimensional Hilbert space and φ is a seminorm. More precisely, we prove that there exists a minimizer that is "sparse" in the sense that it is represented as a linear combination of the extremal points of the unit ball associated with the regularizer φ (possibly translated by an element in the null space of φ). We apply this result to relevant regularizers such as the total variation seminorm and the Radon norm of a scalar linear differential operator. In the first example, we provide a theoretical justification of the so-called staircase effect and in the second one, we recover the result in [31] under weaker hypotheses.