The way Charles does this is by generating a root certificate dynamically and makes it really easy to remove by giving you instructions for how to install and remove it just for Chrome for example:
https://www.charlesproxy.com/documentation/proxying/ssl-prox...
https://www.charlesproxy.com/documentation/using-charles/ssl...