Wormholes are fascinating cosmological objects that can connect two distant regions of the universe. Because of their intriguing nature, constructing a wormhole in a lab seems a formidable task. A theoretical proposal by Greenleaf et al. presented a strategy to build a wormhole for electromagnetic waves. Based on metamaterials, it could allow electromagnetic wave propagation between two points in space through an invisible tunnel. However, an actual realization has not been possible until now. Here we construct and experimentally demonstrate a magnetostatic wormhole. Using magnetic metamaterials and metasurfaces, our wormhole transfers the magnetic field from one point in space to another through a path that is magnetically undetectable. We experimentally show that the magnetic field from a source at one end of the wormhole appears at the other end as an isolated magnetic monopolar field, creating the illusion of a magnetic field propagating through a tunnel outside the 3D space. Practical applications of the results can be envisaged, including medical techniques based on magnetism.