If m = is in kg, acceleration due to gravity(g) = m/s² and h = meter: the unit of potenial energy PE  would be Joules..

Note: 1 Joule = 1 Newton-meter.
         1 Newton = 1 kg -m/s²

If we will take a look at the units of the formula for potential energy PE: 

we will have this:

        PE = mgh
             = kg x m/s² x m
             = N-m
        PE = Joules(J)