Encode and decode Base64

Convert text or images to Base64 and decode them when needed. Choose the input type, check the result, then copy or download it.

Choose data and a Base64 action

Input 0 characters
Result 0 characters

Choose or drop an image

PNG, JPG, GIF, WebP, SVG · up to 5 MB

Base64 Data URL
Image processing runs in your browser

Use Base64 in 3 steps

01

Text or image

Choose Text to encode UTF-8 or decode Base64 into text. Choose Image to create a Data URL from a file or restore an image from Base64.

Choose the right mode

InputActionCheck the result
Vietnamese or other Unicode textText → EncodeA Base64 string; use URL-safe if the destination requires it.
Base64 string to read as textText → DecodeUTF-8 text; binary data can produce an error.
Image file or Data URLImage → Encode or DecodeData URL or preview; 5 MB file input and 8 MB decoded output limits.

If the result looks wrong

Text decoding fails
Check the Base64 string for missing or extra characters; decoded bytes must also be UTF-8. For an image, switch to Image mode.
No image preview
Use actual PNG, JPG, GIF, WebP or SVG bytes. A Data URL with the wrong image type or unrecognized bytes is rejected.
Base64 is longer than the file
Base64 is a text representation, not compression. If embedding is unnecessary, use the original image file to avoid extra size.

Data and limits

Input is converted in your browser and is not uploaded to an KitoTool server for this conversion. Base64 can be decoded; do not use it to hide passwords, keys or sensitive data. Anyone receiving a Data URL can recover the full image.

Comments & feedback

Rate this tool

Loading ratings…

Write a commentNo account needed

Do not share passwords, sensitive information or the contents of files you are processing.

Reviewed before posting. Email stays private.

Embed this tool on your websiteFree · Copy once, receive tool updates automatically

Paste the iframe into HTML, WordPress or any platform that supports embeds. The tool runs in the visitor’s browser; adjust its height and theme as needed.

View the embed guide and supported platforms →

<div style="max-width:900px">
  <iframe data-kitotool-embed src="https://kitotool.com/embed/en/base64-encoder-decoder/" title="Base64 Encoder Decoder — KitoTool" width="100%" height="1100" style="display:block;width:100%;border:1px solid #dbe3ee;border-radius:12px" loading="lazy" referrerpolicy="strict-origin-when-cross-origin"></iframe>
  <p style="margin:6px 2px 0;text-align:right;font:12px/1.5 system-ui,sans-serif;color:#64748b">Free tool by <a href="https://kitotool.com/en/base64-encoder-decoder/" target="_blank" rel="nofollow noopener noreferrer" style="color:#2359d4;text-decoration:underline">KitoTool</a></p>
</div>

The code includes a visible credit below the iframe; its link uses nofollow for a widely distributed widget.

Optional: automatically resize the iframe

Add this script once to the page containing the iframe.

<script>
(function(){var origin="https://kitotool.com";function frames(){return document.querySelectorAll("iframe[data-kitotool-embed]")}function measure(f){if(f.contentWindow&&new URL(f.src).origin===origin)f.contentWindow.postMessage({type:"kitotool:measure"},origin)}window.addEventListener("message",function(e){if(e.origin!==origin||!e.data||e.data.type!=="kitotool:resize"||!Number.isFinite(e.data.height))return;frames().forEach(function(f){if(f.contentWindow===e.source&&new URL(f.src).origin===origin)f.style.height=Math.max(320,Math.min(12000,Math.ceil(e.data.height)))+"px";});});function connect(){frames().forEach(function(f){f.addEventListener("load",function(){measure(f)});measure(f)})}if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",connect,{once:true});else connect()})();
</script>