Text to encode:
Encoded result:
Encoding Format:
About Base64 Encoding/Decoding
How to use:
- Choose between Encode or Decode in the tabs
- Select the appropriate encoding format for your needs
- For encoding, choose whether to include padding characters
- Enter your text in the input editor
- Click the Encode/Decode button to process your text
- Copy the results from the output editor
Standard Base64
Uses the character set A-Z, a-z, 0-9, +, and / with = for padding. May cause issues in URLs and filenames due to special characters.
Example:
Original: Hello World!
Base64: SGVsbG8gV29ybGQh
Base64URL
URL-safe variant that replaces + with - and / with _. Safe to use in URLs, filenames, and other contexts.
Example with special chars:
Standard: a+b/c==
Base64URL: a-b_c==
What is padding?
Base64 encodes 3 bytes of data into 4 characters. When the input length is not a multiple of 3, padding characters (=) are added to make the output length a multiple of 4.
Padding examples:
- 1 byte remaining: two padding chars (==)
- 2 bytes remaining: one padding char (=)
Tip: Some systems can decode Base64 without padding. Omitting padding makes encoded strings shorter but may cause compatibility issues with some decoders.
Common Base64 Use Cases:
Email Attachments
MIME format uses Base64 to encode binary attachments in email
Data URIs
Embedding images directly in HTML/CSS using Base64 encoding
JWT Tokens
JSON Web Tokens use Base64URL encoding for their components
Base64 encoding increases data size by approximately 33% compared to the original. It is not a form of encryption and does not provide security - it is an encoding scheme for representing binary data in ASCII text format.