You have three options depending on why you are doing this.
The first is to run a minifier during the build process; however, this is not recommended for a number of reasons. Key being that those carriage returns might be important to you.
The second is to create an httpmodule that removes them as the html is emitted back to the browser. Again, not recommended for the same reasons as above.
The third option is to simply turn on compression (gzip) for your content. This will compress it down for transfer. When the browser uncompresses it for display the carriage returns will still be there but the compression should have reduced the amount of network traffic involved.
Honestly, I can't think of a reason to do anything other than turn on regular compression. The downsides are too big.