The relationship between coking pressure, lateral shrinkage and vertical shrinkage during carbonization in the coke oven was investigated. During the early and middle stage of the carbonization, no lateral shrinkage (gap between the coke cake and the oven wall) is observed since the outer coke layer is pressed against the oven walls by the coking pressure. It is not until the coking pressure peak ends in the later stage of the carbonization process that the lateral shrinkage starts to develop. The horizontal contraction of coke across the oven width is distributed between the lateral shrinkage and the gap at the oven centre. The final measured lateral shrinkage is 2–5 mm and increases only by 1.6 mm per 10% increase in volatile matter. The coke cake is prevented from shrinking vertically when the coking pressure is high. The coke cake starts to shrink vertically when the downward force (the weight of coke cake) becomes greater than the upward frictional force between the coke cake and the oven wall, which is caused by the coking pressure. The later the coke cake starts to shrink vertically, the smaller the final vertical coke shrinkage.