Whether you are selling a theme online or want to keep people from going through your site’s source code to find out information about it, there are things you can do to obfuscate your code. Source Guard for WordPress happens to be an awesome plugin that lets you encode and obfuscate your website’s output source code. It provides three website source protection modes.
The plugin offers HTML obfuscation and JavaScript encoding. You can enable and disable them when you want. You don’t need to run a special software on your server to get this to work. A standalone version of this plugin is also available. Source Guard for WP sets you back $14.