We have developed a three-dimensional passive micromixer based on new mixing principles, fluid twisting and flattening. This micromixer is constructed by repeating two microchannel segments, a "main channel" and a "flattened channel", which are very different in size and are arranged perpendicularly. At the intersection of these segments the fluid inside the micromixer is twisted and then, in the flattened channel, the diffusion length is greatly reduced, achieving high mixing efficiency. Several types of micromixer were fabricated and the effect of microchannel geometry on mixing performance was evaluated. We also integrated this micromixer with a miniaturized DNA purification device, in which the concentration of the buffer solution could be rapidly changed, to perform DNA purification based on solid-phase extraction.