I want to measure the voltage across an inductor as soon as I disconnect one of its terminals to visualize how back EMF changes with and without a fly-back diode. From videos on Youtube: https://www.youtube.com/watch?v=43HFng0CVKg and other sources I found out the back EMF spikes usually reach very high voltages even above 400V. If my Oscilloscope is rated for a maximum input voltage of 400V, could measuring these spikes damage it? perhaps create an internal arc? I've seen many people do this experiment as demonstration and no one mentions the oscilloscope's maximum input voltage restriction. I would like to know if it is safe to measure this type of voltage spikes.
Yes it can damage the scope or the probe or both.
A scope that is rated to handle 400V without damage should not be used to measure voltages over 400V.
A 10x probe will divide the voltage by ten, but then the probe must be rated to handle over 400V as well, or it might be damaged. And if the probe gets damaged, it can pass the full measured voltage to scope and it may again damage the scope.
Note that if you are seeing 400V with a x1 probe then changing to say x10 will usually increase the probe's load impedance, and so the spike may be correspondingly higher.
Best to start with a higher-voltage probe, say x100, and work down to the more sensitive ones as required.
You should always measure within the oscilloscopes input tolerances. However if your scope is CAT rated it should have some tolerances to handle spikes over the rating depending on if it's CAT I CAT II, III and IV and so on.
That is why different voltage levels for example may be displayed on a multimeter in accordance like CAT II 1000V and CAT III 600V, as an illustrative example.