In spacetimes with compact dimensions there exist several black object solutions including the black-hole and the black-string. These solutions may become unstable depending on their relative size and the relevant length scale set by the compact dimensions. The transition between these solutions raises puzzles and addresses fundamental questions such as topology change, uniquenesses and cosmic censorship. Here, we consider black strings wrapped over the compact circle of a d-dimensional cylindrical spacetime. We construct static perturbative non-uniform string solutions around the instability point of a uniform string. First we compute the instability mass for a large range of dimensions, d, and find that it follows essentially an exponential law γ d , where γ is a constant. Then we determine that there is a critical dimension, d * = 13, such that for d ≤ d * the phase transition between the uniform and the non-uniform strings is of first order, while for d > d * , it is, surprisingly, of higher order.