Base64 Encoder and Decoder

Encode text or files to Base64 and decode Base64 back to text. Turn images into data URIs or a CSS background line. Everything runs in your browser.

What is Base64 Encoding?

Base64 is an encoding scheme used to represent binary data in an ASCII string format. It works by translating groups of 24 bits into 4 printable characters. This tool natively supports UTF-8 text encoding, meaning emojis and special characters will translate perfectly without throwing errors.

Why do developers use Base64?

Encoding images for CSS and HTML

Choose Encode a file or image to turn a PNG, SVG, icon or font into Base64. Pick Data URI for use in an src attribute, or CSS background-image to get a line you can paste into a stylesheet. Inlining suits small files such as icons; for large images a normal file is faster, because Base64 makes data about a third larger.

Decoding tips

The decoder accepts Base64 with line breaks, the URL-safe alphabet, missing padding and full data: URIs. If the decoded bytes are not readable text, for example an image or PDF, you can download them as a file instead.

Note: Base64 is an encoding format, not an encryption method. Never use Base64 to "hide" sensitive information or passwords, as it can be easily decoded by anyone.

Action completed.