Topological defects such as cosmic strings may have been formed at early-universe phase transitions. Direct tests of this idea are impossible, but the mechanism can be elucidated by studying analogous processes in low-temperature condensed-matter systems. Experiments on vortex formation in superfluid helium and in superconductors have so far yielded somewhat confusing results. I shall discuss their possible interpretation.