  We study the 2-parity conjecture for Jacobians of hyperelliptic curves over
number fields. Under some mild assumptions on their reduction, we prove the
conjecture over quadratic extensions of the base field. The proof proceeds via
a generalisation of a formula of Kramer and Tunnell relating local invariants
of the curve, which may be of independent interest. A new feature of this
generalisation is the appearance of terms which govern whether or not the
Cassels--Tate pairing on the Jacobian is alternating, which first appeared in
work of Poonen--Stoll. We establish the local formula in many instances and
show that in remaining cases it follows from standard global conjectures.
