We investigate possible pathways for the formation of the low density Neptune-mass planet HAT-P-26b. We use two formation different models based on pebbles and planetesimals accretion, and includes gas accretion, disk migration and simple photoevaporation. The models tracks the atmospheric oxygen abundance, in addition to the orbital period, and mass of the forming planets, that we compare to HAT-P-26b. We find that pebbles accretion can explain this planet more naturally than planetesimals accretion that fails completely unless we artificially enhance the disk metallicity significantly. Pebble accretion models can reproduce HAT-P-26b with either a high initial core mass and low amount of envelope enrichment through core erosion or pebbles dissolution, or the opposite, with both scenarios being possible. Assuming a low envelope enrichment factor as expected from convection theory and comparable to the values we can infer from the D/H measurements in Uranus and Neptune, our most probable formation pathway for HAT-P-26b is through pebble accretion starting around 10 AU early in the disks lifetime.