A man with two 30-millimetre nails still embedded in his head has been airlifted to Brisbane from Hervey Bay.

The man in his twenties had been doing construction work inside a property in the Wide Bay area and was on a ladder when he slipped, accidentally discharging the nail gun which shot the two large nails into his skull.

The man was treated in Hervey Bay Hospital before being taken by the RACQ LifeFlight Rescue helicopter to the Royal Brisbane and Women's Hospital.

He was alert and in a stable condition when he was airlifted about 8:00pm on Thursday, according to a RACQ LifeFlight statement.