For the safety of you and your family, a gas water heater must be raised off the ground. This will prevent a fire or possible explosion in the event that a flammable substance is spilled near the water heater.
According to the National Fuel Gas Code and the Uniform Plumbing Code, a gas water heater should be raised at least 18 inches from the ground. This standard specifically applies to units that are installed in garages, but it is still a good idea regardless of the location. The 18-inch requirement is from the ground to the pilot light or lighting mechanism. The stand that you use to elevate your water heater should also be strong enough to hold the tank when it is full. It is important to note that your city or municipality may have different regulations, so you should check with your local authorities before installing your new water heater.