Researchers in molecular biology spend a significant amount of time tending to the staining and destaining of electrophoresis gels. Here we describe a simple system, costing approximately $100 and taking approximately 1 h to assemble, that automates standard nucleic acid and protein gel staining protocols. Staining is done in a tray or, with DNA gels, in the electrophoresis chamber itself following automatic detection of the voltage drop. Miniature pumps controlled by a microcontroller chip exchange the necessary solutions at programmed time intervals. We demonstrate efficient and highly reproducible ethidium bromide and methylene blue staining of DNA in agarose gels and Coomassie blue and silver staining of proteins in polyacrylamide gels.