Small size clamping device to protect 5V circuit from high voltages
Use TVS protection diode like the GSOT05C. In case of overvoltage, the diode opens and dumps all excessive energy in its p-n junction. So it can work only very briefly before overheating and self-destructing.

To enhance the protection, place a low current poly-switch fuse (such as PSMF01) in series before the input. Once the diode starts conducting, it trips the fuse quickly.