The most common dye used to make DNA or RNA bands visible for agarose gel electrophoresis is ethidium bromide, usually abbreviated as EtBr. It fluoresces under UV light when intercalated into the major groove of DNA (or RNA). By running DNA through an EtBr-treated gel and visualizing it with UV light, any band containing more than ~20 ng DNA becomes distinctly visible. EtBr is a known mutagen, and safer alternatives are available, such as GelRed, produced by Biotium, which binds to the minor groove.
SYBR Green I is another dsDNA stain, produced by Invitrogen. It is more expensive, but 25 times more sensitive, and possibly safer than EtBr, though there is no data addressing its mutagenicity or toxicity in humans.
SYBR Safe is a variant of SYBR Green that has been shown to have low enough levels of mutagenicity and toxicity to be deemed nonhazardous waste under U.S. Federal regulations. It has similar sensitivity levels to EtBr, but, like SYBR Green, is significantly more expensive. In countries where safe disposal of hazardous waste is mandatory, the costs of EtBr disposal can easily outstrip the initial price difference, however.
Since EtBr stained DNA is not visible in natural light, scientists mix DNA with negatively charged loading buffers before adding the mixture to the gel. Loading buffers are useful because they are visible in natural light (as opposed to UV light for EtBr stained DNA), and they co-sediment with DNA (meaning they move at the same speed as DNA of a certain length). Xylene cyanol and Bromophenol blue are common dyes found in loading buffers; they run about the same speed as DNA fragments that are 5000 bp and 300 bp in length respectively, but the precise position varies with percentage of the gel. Other less frequently used progress markers are Cresol Red and Orange G which run at about 125 bp and 50 bp, respectively.
Visualization can also be achieved by transferring DNA after SDS-PAGE to a nitrocellulose membrane followed by exposure to a hybridization probe. This process is termed Southern blotting.
For fluorescent dyes, after electrophoresis the gel is illuminated with an ultraviolet lamp (usually by placing it on a light box, while using protective gear to limit exposure to ultraviolet radiation). The illuminator apparatus mostly also contains imaging apparatus that takes an image of the gel, after illumination with UV radiation. The ethidium bromide fluoresces reddish-orange in the presence of DNA, since it has intercalated with the DNA. The DNA band can also be cut out of the gel, and can then be dissolved to retrieve the purified DNA.
The gel can then be photographed usually with a digital or polaroid camera. Although the stained nucleic acid fluoresces reddish-orange, images are usually shown in black and white (see figures). UV damage to the DNA sample can reduce the efficiency of subsequent manipulation of the sample, such as ligation and cloning. Shorter wavelength UV radiations (302 or 312 nm) cause greater damage, for example exposure for as little as 45 seconds can significantly reduce transformation efficiency. Therefore if the DNA is to be use for downstream procedures, exposure to a shorter wavelength UV radiations should be limited, instead  higher-wavelength UV radiation (365 nm) which cause less damage should be used. Higher wavelength radiations however produces weaker fluorescence, therefore if it is necessary to capture the gel image, a shorter wavelength UV light can be used a short time. Addition of Cytidine or guanosine to the electrophoresis buffer at 1 mM concentration may protect the DNA from damage. Alternatively, a blue light excitation source with a blue-excitable stain such as SYBR Green or GelGreen may be used.
Gel electrophoresis research often takes advantage of software-based image analysis tools, such as ImageJ.