Gel electrophoresis separates DNA fragments by size using an electric field and a porous gel matrix, and it remains one of the most widely used techniques in molecular biology. The basic idea is simple: DNA carries a negative charge, so when you apply voltage across a gel, the fragments migrate toward the positive electrode, with smaller pieces slipping through the gel’s pores faster than larger ones. Whether you are checking that a PCR reaction worked, sizing restriction fragments, or purifying a band for cloning, the core workflow involves casting a gel, loading your samples, running the current, and staining to see the results. Each step has choices that affect your resolution, and understanding those choices turns a routine protocol into a genuinely informative experiment.
Why DNA Moves Through a Gel
DNA’s sugar-phosphate backbone carries a negative charge at every repeating unit. When you place a gel between two electrodes and switch on the power supply, every DNA molecule in your sample begins migrating toward the positive electrode. Because the charge-to-mass ratio is essentially the same for all DNA fragments regardless of length, the gel itself is what does the sorting: it acts as a molecular sieve, letting short fragments weave through its pores quickly while long fragments get slowed down. The distance a fragment travels ends up being inversely proportional to the log of its size, which is why a DNA ladder (a set of fragments of known lengths) produces evenly spaced bands on a finished gel.1PubMed Central. Agarose gel electrophoresis for the separation of DNA fragments
This relationship between migration distance and fragment size is what makes the technique so useful. You do not need to know anything about a fragment’s sequence to estimate its length. You just compare how far it traveled against the ladder bands and read off the size. That is enough to confirm whether your PCR amplified the right target, whether a restriction digest cut in the expected places, or whether your plasmid is the size you think it is.
Choosing a Gel Matrix
Most DNA electrophoresis uses agarose, a polysaccharide extracted from seaweed that you melt in buffer, pour into a casting tray, and let solidify with a comb in place to form wells. Agarose concentration determines pore size: a 0.7% gel has large pores and is good for resolving fragments in the range of roughly 1,000 to 20,000 base pairs, while a 2% gel has smaller pores suited to fragments between about 50 and 1,000 base pairs. If you are checking a typical PCR product of a few hundred base pairs, a 1–1.5% gel is usually the sweet spot.
Polyacrylamide is the other option, and it provides much finer resolution for small fragments and can distinguish pieces that differ by just a single base pair. It is the gel of choice for sequencing gels and for analyzing very short DNA molecules. But polyacrylamide gels are trickier to pour (the acrylamide monomer is a neurotoxin before it polymerizes), and the pore structure interacts differently with DNA shape. Curved or bent DNA molecules migrate anomalously slowly in polyacrylamide, primarily because of preferential interactions between the curved DNA and the polyacrylamide matrix rather than simple pore-size restriction.2PubMed Central. Electrophoresis of DNA in agarose gels, polyacrylamide gels and in free solution In agarose, this anomaly does not appear, so if you are sizing DNA and want straightforward results, agarose is the safer choice.
Picking a Buffer
You need a running buffer both to dissolve the agarose and to fill the electrophoresis tank, keeping ions flowing and pH stable during the run. The two main options are TAE (Tris-acetate-EDTA) and TBE (Tris-borate-EDTA). Both work well for fragments in the hundreds-to-thousands base pair range, but they have subtle differences. TBE gives slightly sharper resolution of smaller fragments, while TAE performs a little better with larger DNA.3PubMed Central. Modification of gel architecture and TBE/TAE buffer composition to minimize heating during agarose gel electrophoresis
TAE has one practical advantage for downstream work: if you plan to cut a band out of the gel and purify the DNA for cloning or ligation, TAE is generally preferred because borate ions from TBE can inhibit some enzymatic reactions. TBE, on the other hand, has better buffering capacity and is less likely to overheat during long runs at higher voltages. For routine analytical gels where you just want to see your bands and take a photo, either buffer is fine. Just be consistent: make your gel with the same buffer you fill the tank with.
Preparing and Loading Samples
Before loading, you mix each DNA sample with a loading dye. The dye does two things: it contains glycerol or another dense substance that makes the sample sink to the bottom of the well instead of floating away into the buffer, and it includes one or two tracking dyes (commonly bromophenol blue and xylene cyanol) that migrate through the gel at roughly predictable rates so you can monitor how far the run has progressed without turning off the power supply.
Alongside your samples, you always load a DNA ladder in at least one lane. The ladder is a commercially prepared mixture of DNA fragments of known sizes, and it is your ruler for the experiment. If you are working with small fragments, pick a ladder that covers the 50–1,000 bp range. For larger genomic fragments, use one that goes up to 10,000 bp or beyond. Loading the ladder on both sides of a wide gel helps account for any inconsistency in migration across the gel.
The amount of DNA you load matters too. Overloading a well causes bands to smear and distort, making size estimation unreliable. For a standard mini-gel stained with a fluorescent dye, somewhere around 50–200 nanograms of total DNA per lane is a reasonable range. If you are loading a restriction digest with many fragments, you may need more total DNA so that the individual bands are each bright enough to see.
Running the Gel
Once samples are loaded, you connect the electrodes and set your voltage. A common rule of thumb for agarose mini-gels is about 5–8 volts per centimeter of gel length (measured between the electrodes, not the gel itself). Higher voltage means a faster run, but it also generates more heat, which can distort the gel and degrade resolution. For most routine applications, running at a moderate voltage for 30 to 60 minutes gives clean results.
You can watch the tracking dyes in the loading buffer creep down the gel to judge when to stop. Bromophenol blue migrates at roughly the same rate as a 300 bp fragment in a 1% agarose gel, so once it has traveled far enough to separate your fragments of interest, you turn off the power. Running the dye off the end of the gel is not catastrophic, but your smallest fragments will have run off too, and you will lose information.
Staining and Visualization
DNA is invisible in an unstained gel, so you need a way to see your bands. The classic stain is ethidium bromide, which intercalates between the base pairs and fluoresces under ultraviolet light. It has been the workhorse dye for decades, but it is a known mutagen, meaning it can cause DNA damage in living cells. That has prompted many labs to switch to safer alternatives.4Al-Salam Journal for Medical Science. Investigation of Gel Electrophoresis Stains
SYBR Gold and SYBR Green I are two widely used alternatives. Both are more sensitive than ethidium bromide for certain applications and carry lower toxicity profiles. SYBR Gold in particular has a very high fluorescence enhancement when bound to nucleic acids and penetrates gels more completely than SYBR Green stains, making it the more sensitive option overall.5PubMed. Characterization of SYBR Gold nucleic acid gel stain: a dye optimized for use with 300-nm ultraviolet transilluminators One thing to be aware of is that both SYBR Gold and SYBR Green can shift the apparent migration of DNA bands slightly, which means your size estimates may be a little off compared to an ethidium bromide-stained gel.6PubMed. Comparative analysis of the DNA staining efficiencies of different fluorescent dyes in preparative agarose gel electrophoresis For routine checks this barely matters, but for precise sizing you should run your ladder and sample with the same stain and compare within the same gel.
Some of the newer dyes, including SYBR Safe and plant-based staining options, are designed specifically to be compatible with blue-light transilluminators rather than UV. Blue light is much less damaging to both the user and the DNA, which matters if you plan to cut out a band and use it downstream. UV exposure nicks DNA, reducing the efficiency of subsequent cloning or ligation steps.
Reading the Gel and Quantifying Bands
After staining, you photograph the gel under the appropriate light source. A good gel image shows distinct, well-separated bands in each lane, with the ladder bands providing a clear reference for sizing. You estimate the size of an unknown band by comparing how far it migrated relative to the known ladder bands. Plotting ladder fragment sizes against their migration distances on a semi-log scale gives a roughly linear relationship, and your unknown band’s position on that line tells you its approximate length.
For quantification, you can go further. Image-analysis software like ImageJ lets you measure the brightness (pixel intensity) of each band. By comparing the integrated intensity of your band to a ladder band of known mass, you can estimate how much DNA is in that band. More sophisticated workflows pair ImageJ with scripting in Python or R to subtract background noise and calculate the area under each band’s intensity curve, improving accuracy for applications like measuring the yield of an in vitro transcription reaction.7PubMed Central. A convenient analytic method for gel quantification using ImageJ paired with Python or R Earlier approaches used video cameras and the NIH Image program to achieve similar nonradioactive quantification of small DNA amounts from PCR reactions.8PubMed. A quantitative method of determining initial amounts of DNA by polymerase chain reaction cycle titration using digital imaging and a novel DNA stain
Cutting Out Bands for Downstream Use
One of the most common reasons to run a gel is preparative: you want to isolate a specific DNA fragment from a mixture. After staining, you locate the band of interest, slice it out of the gel with a clean razor blade, and extract the DNA using a gel-extraction kit. These kits typically work by dissolving the agarose slice in a chaotropic salt solution, then binding the freed DNA to a silica column, washing away contaminants, and eluting the pure DNA in a small volume of low-salt buffer.
Recovery efficiency is worth paying attention to. How much DNA you get back depends on fragment size, the elution conditions, and the kit. Regenerated silica columns from certain kits perform comparably to fresh ones, so if budget is a concern, reusing columns is a validated option.9Scientific Reports. Rapid Regeneration and Reuse of Silica Columns from PCR Purification and Gel Extraction Kits At very low DNA concentrations, though, silica-based extraction can lose a large fraction of your material. One study found that more than 70% of DNA was unrecoverable under standard elution conditions when starting amounts were low, unless the initial binding step used specific high-concentration chaotropic conditions.10PLOS ONE. Low concentration DNA extraction and recovery using a silica solid phase If you are working with precious, low-abundance samples, consider loading more DNA to begin with or using alternative purification methods like electroelution.
Adapting the Protocol for RNA
Running RNA on a gel follows the same broad logic, but RNA molecules fold into secondary structures that mess up size-based separation. A single-stranded RNA that should appear as one crisp band can smear or migrate unpredictably if it is partially folded. The standard solution is to denature the RNA before and during electrophoresis. Formaldehyde-containing agarose gels have long been the gold standard for this: the formaldehyde reacts with the amino groups on the bases, preventing hydrogen bonds from forming and keeping the RNA in a linear, unfolded state.
Formaldehyde fumes are unpleasant and toxic, though, which has spurred alternatives. Adding a small amount of household bleach (sodium hypochlorite) to the agarose effectively denatures RNA secondary structure and destroys contaminating RNases in a single step, eliminating the need for formaldehyde entirely.11PubMed Central. Bleach gel: a simple agarose gel for analyzing RNA quality Another approach uses borax as a buffer additive, which provides both buffering and denaturing-like behavior, achieving resolution comparable to formaldehyde gels.12bioRxiv. Borax-Based Gel Electrophoresis: A Novel Approach for RNA Integrity Analysis Both methods make RNA gel electrophoresis more accessible for labs that want to avoid formaldehyde handling.
Beyond the denaturing step, RNA work requires extra cleanliness. RNases are everywhere — on your skin, on bench surfaces, in dust — and they will chew up your samples in seconds. Using RNase-free water, wiping surfaces with an RNase decontamination solution, wearing gloves, and using dedicated equipment are all standard precautions.
Separating Very Large DNA
Standard agarose gel electrophoresis tops out at roughly 20,000 to 50,000 base pairs. Above that range, large DNA molecules all migrate at approximately the same rate because they move through the gel pores like snakes, stretching end-to-end, and once molecules are long enough, the snake-like motion reaches a speed limit regardless of size. Pulsed-field gel electrophoresis (PFGE) solves this by periodically switching the direction of the electric field. Each time the field changes, molecules have to reorient before they can resume migrating, and the time required for reorientation depends on the molecule’s length. This allows separation of DNA fragments ranging from tens of thousands to hundreds of thousands of base pairs, and even into the megabase range.13PubMed Central. Pulse Field Gel Electrophoresis
PFGE has been especially important in microbiology and epidemiology. It was the backbone of outbreak-tracking systems for foodborne pathogens for years, with public health labs using it to compare bacterial strain fingerprints. Run times are long, often 18 to 24 hours, and the equipment is specialized, but for whole-chromosome-scale separations it remains a powerful tool.
Capillary Electrophoresis and High-Throughput Work
The evolution from slab gels to capillary systems transformed the throughput of DNA analysis. Capillary gel electrophoresis replaces the flat gel with a thin tube filled with a polymer matrix. A tiny amount of sample is injected into one end, separated as it travels through the capillary, and detected by a laser as fragments pass a detector window near the other end. Early demonstrations showed that capillary separations were about three times faster than conventional slab gels, with roughly two-and-a-half times better resolution and over five times higher separation efficiency.14PubMed Central. Capillary gel electrophoresis for rapid, high resolution DNA sequencing
This leap in speed and resolution was instrumental in making large-scale DNA sequencing feasible. The Human Genome Project relied heavily on automated multi-capillary sequencing instruments that could run dozens of capillaries in parallel, each reading a different sequencing reaction simultaneously.15PubMed Central. DNA sequencing by CE Today, capillary electrophoresis is still the standard platform for Sanger sequencing, fragment analysis, and forensic DNA profiling. Next-generation sequencing technologies have largely replaced it for large-scale genome projects, but for targeted applications where you need to read one specific region or size a handful of fragments with high precision, capillary instruments are the everyday workhorse in clinical and forensic labs.
Forensic and Diagnostic Uses
Electrophoresis is woven into many diagnostic workflows. Restriction fragment length polymorphism (RFLP) analysis, one of the earliest DNA-based identification methods, depends on running digested genomic DNA on agarose gels and then transferring the separated fragments to a membrane for hybridization with labeled probes.16PubMed. Restriction fragment length polymorphism analysis While RFLP has been largely replaced by short tandem repeat (STR) profiling for forensic casework, the underlying separation step still relies on electrophoresis — now typically capillary-based in forensic labs.17PubMed Central. DNA Profiling in Forensic Science: A Review
In clinical genetics, gel electrophoresis is used to verify the products of diagnostic PCR tests. If a patient is being screened for a specific mutation, a PCR reaction targeting that region is run and the product is checked on a gel to confirm it is the expected size before further analysis. It is also used in quality-control steps for next-generation sequencing library preparation, where you check that the fragmented DNA library falls within the right size range before loading it onto the sequencer.
Portable and Low-Cost Systems
Traditional gel electrophoresis setups are bulky, require a stable power source, and cost hundreds to thousands of dollars for the power supply, tank, and imaging system together. That limits access in field settings and resource-limited labs. Recent work has produced compact, open-source alternatives. One portable system, measuring just 108 × 108 × 60 mm and weighing 0.7 kg, can run a full gel separation in about 12 minutes at 100 volts and costs around $65 to build. It includes real-time imaging, so you can watch bands separate as the gel runs rather than waiting until the end to stain and photograph.18Sensors and Actuators B: Chemical. A portable, low-cost real-time imaging slab gel electrophoresis system for rapid separation of nucleic acids
Open-source designs like this are especially valuable in developing regions and for educational settings where students can build and use their own equipment. The ability to do on-the-spot gene screening in a field laboratory, rather than shipping samples to a central facility, has real implications for agricultural disease monitoring and point-of-care diagnostics. The core physics of the technique haven’t changed since Oliver Smithies and others developed molecular-sieving gels in the 1950s and 1960s, but the hardware is finally catching up to the idea that electrophoresis should be as accessible as a hand-held microscope.19PubMed. The laboratory technology of discrete molecular separation: the historical development of gel electrophoresis and the material epistemology of biomolecular science, 1945-1970
Common Mistakes and How to Avoid Them
A few pitfalls trip up beginners and occasionally experienced users too. Knowing what can go wrong saves time and reagents.
- Smiling bands: Bands that curve upward at the edges of a lane usually mean the gel ran too hot. Lower the voltage, use a thinner gel, or run in a cold room.
- Fuzzy or smeared lanes: If every lane looks like a smear rather than discrete bands, the DNA may be degraded. Check your sample storage conditions, or if using restriction enzymes, make sure the digest went to completion and the enzyme was heat-inactivated afterward.
- Uneven migration: If the same fragment runs at different heights across the gel, the gel may have been cast unevenly or the buffer level in the tank was not consistent on both sides. Make sure the gel sits level and the buffer covers it by a few millimeters.
- No bands at all: Confirm that the power supply was connected with the correct polarity (DNA runs toward the positive electrode, which is usually red). Also check that your staining worked — run a known positive control alongside your experimental samples.
- Overloaded wells: Bands that are wide, distorted, or seem to merge into adjacent lanes usually mean too much DNA was loaded. Dilute your sample and rerun.
A quick diagnostic habit: always include at least one positive control (a sample you know should produce a band of known size) and one negative control (no-template) alongside your experimental samples. If the positive control looks wrong, the problem is with your gel or running conditions, not your experiment. If the negative control shows a band, you have contamination. These controls take up two lanes but routinely save hours of troubleshooting.