101webtools.com

Command Palette

Search for a command to run...

Base64 Encoder/Decoder

Base64EncoderDecoder

Text to encode:

Loading...

Encoded result:

Loading...

Encoding Format:

About Base64 Encoding/Decoding

How to use:

  1. Choose between Encode or Decode in the tabs
  2. Select the appropriate encoding format for your needs
  3. For encoding, choose whether to include padding characters
  4. Enter your text in the input editor
  5. Click the Encode/Decode button to process your text
  6. Copy the results from the output editor
Base64 vs Base64URL
Understanding the differences

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==

Padding in Base64
Why padding matters

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.