A 3D simulation of a non-relativistic, magnetically driven jet propagating in a stratified atmosphere is presented, covering about three decades in distance and two decades in sideways expansion. The simulation captures the jet acceleration through the critical surfaces and the development of (kink-)instabilities driven by the free energy in the toroidal magnetic field component. The instabilities destroy the ordered helical structure of the magnetic field, dissipating the toroidal field energy on a length scale of about 2-15 times the Alfven distance. We compare the results with a 2.5D (axisymmetric) simulation, which does not become unstable. The acceleration of the flow is found to be quite similar in both cases, but the mechanisms of acceleration differ. In the 2.5D case approximately 20% of the Poynting flux remains in the flow, in the 3D case this fraction is largely dissipated internally. Half of the dissipated energy is available for light emission; the resulting radiation would produce structures resembling those seen in protostellar jets.