The H 2 receptor agonist pharmaceuticals containing ranitidine hydrochloride and famotidine are widely used to inhibit gastric acid secretion. A high-performance thin-layer chromatographic method was developed for their in-process control and content uniformity testing. HPTLC separation was performed on silica precoated plates using the USP 23 mobile phase for famotidine and toluene-methanol-diethylamine (9:1:1, v/v) for ranitidine. The samples were applied on a HPTLC plate automatically. Quantification was done by densitometry at in situ UV absorption maxima of ranitidine hydrochloride and famotidine at 320 nm and 276 nm, respectively. The method was validated in terms of selectivity (related compounds and placebo effect), system suitability, range (30 to 230 ng for ranitidine hydrochloride and 80 to 580 ng for famotidine), accuracy, precision, ruggedness and analyte stability. A large number of analyses were performed simultaneously with a low solvent consumption. The method is fast, accurate and cost-effective.