The standard conversion factor between ounces and grams is 28.34952. In order to convert from ounces to grams, simply multiply by the conversion factor, and to convert from grams to ounces, divide by this same number.
There are several units of mass, weight and volume called ounces. The unit of mass used in the United States and in the imperial measurement system is called the avoirdupois ounce, which uses this standard conversion factor. This differs somewhat from the troy ounce used in metallurgy, which is 31.10 grams, or the fluid ounce, which is a measure of volume and not mass.