Plenty. India, Kenya, Australia, Canada and various ex-SSRs all spring to mind. Not many without violence on the run-up, I'll grant you, but in many cases, the actual process of independence was performed entirely legally.
To suggest that, e.g. Gandhi didn’t have a meaningful role in achieving India’s independence, because the British considered his actions illegal, is very silly.