Abstract We write the gauge fixed action which arises in the quantization of Witten's string field theory in a linear gauge, in a form which applies to both the superstring and the bosonic string. The corresponding BRST transformation is nilpotent only on-shell. We construct also an off-shell nilpotent BRST transformation which formally leaves invariant the quantum effective action. This BRST transformation has a geometrical interpretation which could allow to describe the gauge anomalies of the superstring field theory as the nontrivial cohomology of the BRST charge via the Wess-Zumino consistency condition.