An universal invariant for site and bond percolation thresholds (p_{cs} and p_{cb} respectively) is proposed. The invariant writes {p_{cs}}^{1/a_s}{p_{cb}}^{-1/a_b}=\delta/d where a_s, a_b and \delta are positive constants,and d the space dimension. It is independent of the coordination number, thus exhibiting a topology invariance at any d.The formula is checked against a large class of percolation problems, including percolation in non-Bravais lattices and in aperiodic lattices as well as rigid percolation. The invariant is satisfied within a relative error of \pm 5% for all the twenty lattices of our sample at d=2, d=3, plus all hypercubes up to d=6.