In this paper we would like to complement the results contained in Gavioli (Forum Math, to appear) by dealing with the higher differentiability of integer order of solutions to a class of obstacle problems under non-standard growth conditions, fulfilling variational inequalities of the kind $$\begin{aligned} \int _{\varOmega } \langle {\mathcal {A}}(x, Du), D(\varphi - u) \rangle \, dx \ge 0 \qquad \forall \, \varphi \in {\mathcal {K}}_{\psi }(\varOmega ). \end{aligned}$$Here the operator $${\mathcal {A}}$$ satisfies p, q-growth conditions with p and q related by 1$$\begin{aligned} \frac{q}{p} n$$. More precisely the function $$\psi \in W^{1,p}(\varOmega )$$, called obstacle, is such that $$D\psi \in W^{1,r}_{\mathrm{loc}}(\varOmega )$$ and $${\mathcal {K}}_{\psi }=\{w \in W^{1,p}(\varOmega ): w \ge \psi \,\, \text {a.e. in }\varOmega \}$$ is the class of admissible functions. The main difference with the previous work (Gavioli in Forum Math, to appear) is that here we assume the same regularity both for the gradient of the obstacle $$D\psi$$ and for the partial map $$x\mapsto {\mathcal {A}}(x,\xi )$$, that is, a higher differentiability of Sobolev order in the space $$W^{1,r}$$ with the same $$r>n$$ appearing in (1). For the sake of clarity, we focus on the derivation of the a priori estimates since the approximation procedure is standard and can be found in Cupini et al. (Nonlinear Anal 154:7–24, 2017), Cupini et al. (Differ Equ 265(9):4375–4416, 2018), Cupini et al. (Nonlinear Anal 54(4):591–616, 2003), Eleuteri et al. Ann Mat Pura Appl (195(5):1575–1603, 2016) and Gavioli (Forum Math, to appear).