Using density functional theory based simulations, the adsorption of hydrogen on GaN nanowires with [0 0 0 1] orientation is studied with Pt and Pd functionalization. The adsorption energies show that both Pt and Pd prefer to attach to a top site above the Ga atom in the nanowire. In the pristine GaN, hydrogen attach as a molecule, while in the presence of Pt and Pd, it dissociates into atoms and adsorb through a chemical bonding. Change in Ga-N bond lengths are observed with hydrogen adsorption on the surface of the nanowire and the resultant strain as well as the charge transfer between atoms can be used as entities to understand the detection mechanism. From the electronic structure analysis, it is revealed that both Pt and Pd can be used to tune the band gap and are favorable adsorbates to enhance the hydrogen sensing properties of GaN nanowires. Pt turns out to be a more efficient adsorbate for hydrogen detection due to the lowered adsorption energies, compact Pt-H bond length and enhanced surface charge reconstruction.