Base64 Encode and Decode
Encode any text to Base64 or decode Base64 strings back to readable text. Handles UTF-8 and URL-safe Base64, and runs entirely in your browser.
Encode any text to Base64 or decode Base64 strings back to readable text. Handles UTF-8 and URL-safe Base64, and runs entirely in your browser.
Base64 turns binary or text data into a string made of 64 safe ASCII characters. It is used to embed data in JSON, HTML, CSS and email, and to pass data through systems that only accept plain text.
This tool encodes text (including emoji and non-English characters, as UTF-8) and decodes Base64 back to text. Everything runs in your browser.
Input: Hello, World! Output: SGVsbG8sIFdvcmxkIQ==
Base64, described in RFC 4648, works by taking input three bytes (24 bits) at a time and splitting them into four groups of six bits. Each six-bit value from 0 to 63 maps to one character from A to Z, a to z, 0 to 9, plus and slash. Because three bytes become four characters, the output is about one third larger than the input. When the length is not a multiple of three, one or two equals signs pad the end.
A worked example: the text Man is three bytes, 77, 97 and 110. In binary that is 01001101 01100001 01101110, regrouped as 010011 010110 000101 101110, which are 19, 22, 5 and 46, giving TWFu. Base64 operates on bytes, not characters, so text must first be converted to bytes, usually UTF-8. If the decoder assumes a different encoding, accented letters and emoji appear garbled.
No. Base64 is an encoding, not encryption. Anyone can decode it, so never use it to protect secrets.
A variant that uses - and _ instead of + and /, and drops the = padding, so the result can sit safely in a URL or filename.
The input contains characters outside the Base64 alphabet, or the decoded bytes are not valid UTF-8 text, for example when the data is a binary file.
No. Encoding and decoding happen in your browser.
It stores six bits of data in every eight-bit character, so output is roughly 33 percent larger than the input, plus any padding. That overhead is the price for using only safe text characters.
The tool decodes to text. If the Base64 represents an image or other binary file, the result will not be readable text, so use a tool made for converting files.