The process in which molecules (such as proteins, DNA, or RNA fragments) can be separated according to size and electrical charge by applying an electric current to them. The current forces the molecules through pores in a thin layer of gel, a firm jelly-like substance. The gel can be made so that its pores are just the right dimensions for separating molecules within a specific range of sizes and shapes. Smaller fragments usually travel further than large ones. The process is sometimes called gel electrophoresis.