A periodic array of topological spin textures, such as skyrmions and hedgehogs, is called the multiple-Q spin texture, as it is represented by a superposition of multiple spin density waves. Depending on the way of superposition, not only the magnetic but also the topological properties are modified, leading to a variety of quantum transport and optical phenomena caused by the emergent electromagnetic fields through the Berry phase. Among others, the phase degree of freedom of the superposed waves is potentially important for such modifications, but its effect has not been fully investigated thus far. Here we perform systematic theoretical analyses of magnetic and topological properties of the multiple-Q spin textures with the phase degree of freedom in two and three dimensions. By introducing a hyperspace with an additional dimension corresponding to the phase degree of freedom, we establish a generic framework to deal with the phase shift in the multiple-Q spin textures. Using the hyperspace representation, we elaborate the complete topological phase diagrams for the superpositions of three proper screws or sinusoidal waves in two dimensions and those of four in three dimensions. In the two-dimensional case, we find that the phase shift as well as the magnetization change can yield the skyrmion lattices with the skymion number of −2, −1, 1, and 2, corresponding to the evolution of the Dirac strings connecting hedgehogs and antihedgehogs in the three-dimensional hyperspace. We show that the high skyrmion numbers ±2 appear in wider parameter regions for the sinusoidal superpositions than the screw ones. Meanwhile, in the three-dimensional case, we clarify that the topological phase diagrams include various types of the hedgehog lattices whose total number of hedgehogs and antihedgehogs ranges up to 48 in a cubic unit. Interestingly, the phase shift can generate unusual Dirac strings running on the horizontal planes perpendicular to the magnetization direction, which gives rise to unconventional pair creation of hedgehogs and antihedgehogs while increasing the magnetization in the case of the screw superpositions. We also show that the amplitude of the emergent magnetic field is maximized by fusion of hedgehogs and antihedgehogs on the horizontal Dirac strings in both proper screw and sinusoidal cases. In addition, by analyzing the numerical data in the previous studies, we demonstrate that phase shifts are indeed caused by an external magnetic field, associated with the topological transitions in the multiple-Q spin textures. Our results illuminate the topological aspects of the skyrmion and hedgehog lattices with the phase degree of freedom, which would be extended to other multiple-Q textures and useful for the exploration of topologically nontrivial magnetic phases and exotic quantum phenomena.