Let I be a squarefree monomial ideal, and let d denote the maximum degree of a minimal generator of I. We prove that \[ v(I^t)\le v(I^{(t)})+(t-1)(d-1) \] for all t≥1, where I(t) denotes the t-th symbolic power of I. In particular, this bound does not depend on the number of variables in the ambient polynomial ring. On the other hand, for every fixed exponent t≥2, the difference \[ v(I^{(t)})-v(I^t) \] can be arbitrarily large. Finally, we determine the v-numbers of the ordinary and symbolic powers of edge ideals of paths and cycles.