Sending the key to a website is about 5000% less safe than keeping it in a .txt file, unencrypted. Its a lot easier to hack a website than it is to hack a PC.
But yeah, don't do either. Any other add-on could just get the key then do whatever it wants with it, and there would be no way for you to know, or stop it.