Heart Rate Variability (HRV) evaluates the autonomic nervous system regulation and can be used as a monitoring tool in conditions such as cardiovascular diseases, neuropathies and sleep staging. It can be extracted from the electrocardiogram (ECG) and the photoplethysmogram (PPG) signals. Typically, the HRV is obtained from the ECG processing. Being the PPG sensor widely used in clinical setups for physiological parameters monitoring such as blood oxygenation and ventilatory rate, the question arises regarding the PPG adequacy for HRV extraction. There is not a consensus regarding the PPG being able to replace the ECG in the HRV estimation. This work aims to be a contribution to this research area by comparing the HRV estimation obtained from simultaneously acquired ECG and PPG signals from forty subjects. A peak detection method is herein introduced based on the Hilbert transform: Hilbert Double Envelope Method (HDEM). Two other peak detector methods were also evaluated: Pan-Tompkins and Wavelet-based. HRV parameters for time, frequency and the non-linear domain were calculated for each algorithm and the Pearson correlation, T-test and RMSE were evaluated. The HDEM algorithm showed the best overall results with a sensitivity of 99.07% and 99.45% for the ECG and the PPG signals, respectively. For this algorithm, a high correlation and no significant differences were found between HRV features and the gold standard, for the ECG and PPG signals. The results show that the PPG is a suitable alternative to the ECG for HRV feature extraction.