Remote photoplethysmography (rPPG) enables non-invasive heart rate (HR) measurement via video, offering a promising tool for remote physiological monitoring. In a previous study, we validated an adapted rPPG algorithm developed by van der Kooij and Naber (Behav Res Methods 51(5):2106–2119, 2019), collecting video via an online platform using a common web browser and comparing results to phone-based HR measurements. In the present study, we extend this methodological pipeline by validating the same refined algorithm and online video collection pipeline against electrocardiogram (ECG) ground-truth measurements. While previous studies have typically relied on online data collection without ECG reference standards or laboratory-based protocols lacking online implementation, our study bridges this gap by directly comparing video data collected through a standard web browser using the Gorilla Experiment Builder platform with simultaneous ECG recordings. We also evaluated the optimal conditions for rPPG accuracy in terms of video duration and distance from the webcam. We recorded 180 videos across five durations (10 s, 25 s, 35 s, 45 s, and 100 s) and two distances (close = 35 cm, far = 50 cm). Results showed excellent agreement between rPPG- and ECG-derived HR, with an intraclass correlation coefficient (ICC) of 0.96 and 95% of measurements within Bland–Altman limits of agreement. Longer video durations significantly reduced error and variability, while recording distance had no significant effect. Validation of this rPPG pipeline against ECG ground truth establishes the reliability of web-based rPPG measurements, providing a foundation for large-scale online data collection with fidelity comparable to controlled laboratory assessments.