HTML code script Image to Base64

Created on 3 July, 2024 • 114 views

HTML code script Image to Base64

<!DOCTYPE html>

<html>

<head>

 <title>Image to Base64 Converter</title>

</head>

<body>

 <h1>Image to Base64 Converter</h1>

 <input type="file" id="imageFile" accept="image/*">

 <button onclick="convertToBase64()">Convert</button>

 <pre id="base64Data"></pre>

 <script src="script.js"></script>

</body>

</html>