We prove local boundedness of local minimizers of scalar integral functionals ∫Ωf(x,∇u(x))dx, Ω⊂Rn where the integrand satisfies (p,q)-growth of the form \begin{equation*} |z|^p\lesssim f(x,z)\lesssim |z|^q+1 \end{equation*} under the optimal relation p1−q1≤n−11.