Mass is the amount of matter in an object,whereas weight is theforce of gravity acting on the mass of an object. A change in gravity causes change on the weight of a matter. The greater the gravitational force, the heavier is the weight of the object.
The gravitational and size of object do not affect the mass of an object. hence ,the mass is the same on the Earth, the Moon and in the Outer space.