We have designed and investigated a contactless magnetic phase shifter for flux-based superconducting qubits. The phase shifter is realized by placing a perpendicularly magnetized dot at the center of a superconducting loop. The flux generated by this magnetic dot gives rise to an additional shielding current in the loop and induces a phase shift. By modifying the parameters of the dot an arbitrary phase shift can be generated in the loop. This magnetic phase shifter can, therefore, be used as an external current source in superconducting circuits, as well as a suitable tool to study fractional Josephson vortices.