This paper describes an electroanalytical method for the simultaneous determination of vanillin (VAN) and caffeine (CAF) using an anodically pretreated boron-doped diamond electrode. Selective determination of one compound in the presence of other one was also realized. Both compounds yielded a single irreversible oxidation peak using cyclic voltammetry. The nature of the electrode reaction was found to be diffusion controlled with contribution of adsorption. By using square-wave adsorptive stripping voltammetry after 60 s accumulation under open-circuit voltage, method allowed simultaneous determination of VAN and CAF in phosphate buffer, pH 2.5, with detection limits of 0.234 g (1.54x10(-6) M) and 0.071 mu g mL(-1) (3.66x10(-7)M), respectively. The proposed method was successfully applied in the selective and simultaneous determination of VAN and CAF in commercial food and beverage samples. In addition, for the comparison, high-performance liquid chromatographic method with diode-array detection was developed for the first time for their simultaneous determination.