←

Base64 codec

Input and results are only processed in the current browser and will not be uploaded.
Instructions for use
Select encoding or decoding and Base64 format, enter the content and click Convert. URL-safe format uses minus signs and underscores, and omits trailing padding when encoding; legal padding is automatically filled in when decoding. The tool only accepts text that can be reverted to UTF-8.

Encoding examples

"Hello" encodes to SGVsbG8=, or SGVsbG8 in URL-safe format without the trailing =. The euro sign € is 3 UTF-8 bytes and encodes to 4oKs. Base64 turns every 3 bytes into 4 characters, so the result is about 33% larger than the input bytes.

Standard vs URL-safe Base64

Standard Base64 uses A–Z, a–z, 0–9, + and /, with = padding. URL-safe Base64 replaces + with - and / with _, and is used in URL parameters, file names and JWTs. When encoding, the URL-safe format omits the trailing =; when decoding, the tool adds the padding back automatically.

Frequently asked questions

Is Base64 encryption?

No. Base64 only rewrites data as printable characters, and anyone can decode it. Do not use it to protect passwords or private data; use real encryption when you need secrecy.

Why does decoding say the format is invalid?

Common causes are choosing the wrong format (strings with - or _ need URL-safe), a truncated string, stray characters, or the wrong number of = signs. You also get an error when the decoded bytes are not UTF-8 text, such as an image or a zip file.

Can I encode images or files?

This tool handles UTF-8 text only, up to about 2 million characters. It does not take file uploads or create data URLs for images.

Is my input uploaded?

No. Encoding and decoding run in your browser, and you can copy the result or download it as a text file.

Base64 codec

Good for converting configuration snippets, API parameters, and short text. Base64 is only an encoding method and does not provide encryption or privacy protection; do not treat the encoding result as ciphertext.

settings