Base64 Tool

Universal Encoder & Decoder

๐Ÿ” TEXT & FILES

About This Tool

Encode and decode data using Base64 encoding. Convert text, files, images, and binary data to and from Base64 format. Perfect for data transmission, embedding images in HTML/CSS, API authentication, and cryptographic operations.

Perfect For:

  • Data Transmission: Safely transmit binary data over text protocols
  • Image Embedding: Convert images to data URLs for HTML/CSS
  • API Authentication: Encode credentials for Basic Auth
  • Puzzles & CTFs: Decode Base64 challenges and hidden messages
0 characters | 0 bytes

๐Ÿ“ File Encode/Decode

Upload any file to encode to Base64, or upload a Base64 text file to decode back to its original format.

No file selected

โš™๏ธ Encoding Options

0 characters | 0 bytes | 0% size change

๐Ÿ” Base64 Validator

Ready to validate...

Base64 Character Set

Uppercase (A-Z)

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Values: 0-25

Lowercase (a-z)

a b c d e f g h i j k l m n o p q r s t u v w x y z
Values: 26-51

Numbers (0-9)

0 1 2 3 4 5 6 7 8 9
Values: 52-61

Special Characters

+ (plus) / (slash) = (padding)
Values: 62, 63, padding

URL-Safe Variant

- (minus) _ (underscore)
Replaces + and /

What is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It encodes data using 64 printable characters (A-Z, a-z, 0-9, +, /) making it safe for transmission over text-based protocols.

How It Works

Base64 encoding converts binary data (8-bit bytes) into groups of 6 bits, then maps each 6-bit group to one of 64 printable characters:

Common Use Cases

Base64 encoding is widely used in modern computing:

Standard vs URL-Safe Base64

There are two main Base64 variants:

URL-safe Base64 replaces + with - and / with _ to prevent issues when encoding data for URLs, where + and / have special meanings.

Size Overhead

Base64 encoding increases data size by approximately 33%:

Encoding Process Example

Let's encode "Hi!" step by step:

1. Convert to Binary:
H = 01001000 (72)
i = 01101001 (105)
! = 00100001 (33)
2. Combine into 24-bit group:
010010 000110 100100 100001
3. Map to Base64 characters:
010010 = S (18)
000110 = G (6)
100100 = k (36)
100001 = h (33)
Result: SGkh

Security Note

Important: Base64 is an encoding method, not encryption. It does not provide any security or privacy. Anyone can decode Base64 data instantly. Never use Base64 alone to protect sensitive information!

Frequently Asked Questions

Is Base64 encoding secure?

No! Base64 is NOT encryption or security. It's simply an encoding format that makes binary data readable as text. Anyone can decode Base64 instantly. Use proper encryption (AES, RSA) for security.

Why does Base64 make files bigger?

Base64 increases size by ~33% because it converts 8-bit bytes to 6-bit characters. Every 3 bytes becomes 4 characters, and padding adds extra bytes when needed.

What's the '=' padding character for?

The '=' character pads the output when input length isn't divisible by 3. It ensures the decoder knows where the actual data ends. You'll see 0, 1, or 2 '=' characters at the end of Base64 strings.

Can I encode images and files?

Yes! This tool can encode any file type to Base64. Images can be embedded in HTML as data URLs, and any file type can be Base64-encoded for transmission or storage.

What's URL-safe Base64?

URL-safe Base64 uses - and _ instead of + and / because those characters have special meanings in URLs. It's defined in RFC 4648 ยง5 and is perfect for encoding data in URL parameters or filenames.

Is my data sent to a server?

No! All encoding and decoding happens locally in your browser using JavaScript. Your data never leaves your device, ensuring complete privacy.

Can I decode invalid Base64?

The tool will attempt to decode invalid Base64 but will show a warning. Invalid characters are ignored, and the validator will highlight issues to help you fix them.