Abstract: Dislocations in crystals can be studied by a Peierls-Nabarro type model, which couples linear elasticity with a nonconvex term modeling plastic slip. In the limit of small lattice spacing, and for dislocations restricted to planes, we show that it reduces to a line-tension model, with an energy depending on the local orientation and Burgers vector of the dislocation. This model predicts, for specific geometries, spontaneous formation of microstructure, in the sense that straight dislocations are unstable towards a zig-zag pattern. Coupling between dislocations in different planes can lead to microstructures over several length scales.