We use Galois group actions on étale cohomology to prove results of formality for dg-operads and dg-algebras with torsion coefficients. Our theory applies, among other related objects, to the dg-operad of singular chains of the operad of little disks and to the dg-algebra of singular cochains of the configuration space of points in the complex space. The formality that we obtain is only up to a certain degree, which depends on the cardinality of the field of coefficients.