While both are traffic shaping algorithms, the primary difference lies in their operation. A token bucket allows data bursts up to the bucket’s capacity, while a leaky bucket ensures a constant output rate, irrespective of the input burst size.