HTML to Base64
This online converter allows you to encode HTML to Base64. Although this is an unusual use of the Base64, some developers use it and hope that this converter does exactly what you need. If you are looking for examples of how to embed Base64 encoded data into web pages, please check the following pages: Data URI and HTML.
Output formats
If you do not know what output format you need, check the following examples to see how will look the result of the same Base64-encoded HTML formatted in each of the available formats:
• Plain text:V2VsY29tZSB0byA8Yj5iYXNlNjQuZ3VydTwvYj4h
• Data URI:data:text/html;base64,V2VsY29tZSB0byA8Yj5iYXNlNjQuZ3VydTwvYj4h
• HTML Hyperlink:<a href="data:text/html;base64,V2VsY29tZSB0byA8Yj5iYXNlNjQuZ3VydTwvYj4h"></a>
• HTML Iframe:<iframe src="data:text/html;base64,V2VsY29tZSB0byA8Yj5iYXNlNjQuZ3VydTwvYj4h">
The “iframe” tag is not supported by your browser.
</iframe>
• JavaScript Popup:window.onclick = function () {
this.open("data:text/html;base64,V2VsY29tZSB0byA8Yj5iYXNlNjQuZ3VydTwvYj4h");
};
If I missed an important output format for Base64-encoded HTML strings, please let me know — I would love to implement it.
Comments (21)
I hope you enjoy this discussion. In any case, I ask you to join it.
<script src="data:text/html;base64,PGh0bWw+DQo8aGVhZD4NCjx0aXRsZT5BZG9iZSBEb2N1bWVudCB8I"></script>
and save the file but i couldn't view it in browser
script
element is used to "include" JavaScript code, while for your case you have to useiframe
.just like you should be about not being able to sql inject into the comments(for whatever reason as ive no context for what you were doing)...karma sucks dosent it?
Thank you
base64.guru ✅
web3cc
CM2