Electrophoresis is a widely used technique to separate and purify DNA or RNA fragments by size in an agarose gel.