This paper obtains an essentially optimal bound for the quadratic Littlewood-Offord problem, as conjectured by Nguyen and Vu. Specifically, if a quadratic polynomial $Q(\xi_1,...,\xi_n)$ robustly depends on at least $m$ variables $\xi_i$, then $Pr[Q(\xi_1,...,\xi_n)=0]\le O(1/\sqrt m)$. The proof combines several new ideas, including an inductive decoupling scheme reduc...