How to use
- Choose Encode or Decode, then type or paste your text. The result updates as you type.
- To encode, the text is converted to UTF-8 bytes first, so any language works. Open the output options for the URL-safe alphabet, no padding or line breaks.
- To decode, paste Base64 text. Spaces and line breaks are ignored and missing = padding is accepted. Pick the character set if the original text was not UTF-8.
- For a file or an image, use the file tool: choose the file, then copy or download the Base64 text. To decode, choose a file that holds Base64 and save the result as text or as a binary file.
Formula
Base64 splits the bytes into groups of 3 (24 bits) and writes each group as four 6-bit values, using A to Z, a to z, 0 to 9, + and / (RFC 4648). The output is about 4/3 the size of the input. If the last group is short, = padding fills it up.Example
The text Dog is the bytes 68, 111, 103. That is 010001 000110 111101 100111, the values 17, 6, 61 and 39, which are the letters R, G, 9 and n: RG9n. Do (two bytes) gives RG8= and D gives RA==.
Base64 is an encoding, not encryption: anyone can decode it. Everything here runs in your browser and nothing is uploaded, but do not treat Base64 as a way to hide secrets.