While there are many details to consider ... As with other residential building codes, the required deck guards and deck railing heights will depend on the municipality’s building codes.