I will review the formalism of classical Dirac brackets in the context of W algebras and superalgebras. Dirac brackets allow to deal with a Poisson bracket when constraints are imposed in the phase space. In the context of Wess-Zumino models, this amounts to consider an Hamiltonian reduction of the model, leading to Toda models and W algebras. When considering a special class of Lie superalgebras, it leads to supersymmetric W algebras. In that case, one can introduce a super-field formalism to make the N=1 supersymmetry manifest. For a sub-class of these Lie superalgebras, it leads to N=2 supersymmetric W algebras. I will present these different cases, the last case opening the possibility of a procedure dealing with N=2 super-fields.