Base64 in HTML <script>
A script's src can be a data:text/javascript URI.
Example
<script src="data:text/javascript;base64,Y29uc29sZS5sb2coJ0hlbGxvIGZyb20gQmFzZTY0Jyk="></script> Notes
- Many Content Security Policies forbid data: script sources because attackers abuse them. Prefer normal files or inline scripts with a nonce.
Comments (0)
Questions, ideas or a bug in “Base64 in HTML <script>”? Leave a comment, rate the tool, or reply to others.
No comments yet. Be the first to share your feedback!