Base64 Encode/Decode
Free online Base64 encoder and decoder. Convert text to Base64 and Base64 to text instantly. No server upload, 100% private - runs entirely in your browser.
What is Base64 encoding?
Base64 is a binary-to-text encoding scheme that converts binary data into an ASCII string format using 64 characters. It's commonly used to embed binary data in text-based formats.
How does Base64 encoding work?
Base64 takes 3 bytes (24 bits) of binary data and converts them into 4 ASCII characters (each representing 6 bits). This increases the data size by approximately 33%.
What characters are used in Base64?
Base64 uses 64 characters: A-Z (26 uppercase), a-z (26 lowercase), 0-9 (10 digits), + and /. The = character is used for padding.
Is it safe to use this Base64 tool?
Yes, all processing is done locally in your browser. No data is sent to any server, ensuring 100% privacy and security.
What is URL-safe Base64?
URL-safe Base64 replaces + with - and / with _, and removes padding (=). This makes it safe to use in URLs and filenames without encoding issues.
Why does Base64 increase file size?
Base64 converts 3 bytes into 4 characters, resulting in a 33% size increase. This overhead is necessary to represent binary data as printable text.
What are common uses of Base64?
Base64 is used for embedding images in CSS/HTML, encoding email attachments (MIME), storing passwords in databases, transmitting binary data over text protocols, and data URIs.
Can I decode any Base64 string?
Yes, as long as it's a valid Base64 encoded string. If the string contains invalid characters or incorrect padding, the tool will alert you.
What is the padding character (=) for?
Padding (=) ensures the Base64 string length is a multiple of 4. It's added when the input data length isn't divisible by 3.
Can Base64 encode images?
Yes, Base64 can encode any binary data including images. The result is a text string that can be embedded directly in HTML/CSS using data URIs.
Is Base64 encryption?
No, Base64 is encoding, not encryption. It's easily reversible and provides no security. It's meant for data representation, not protection.
What's the difference between Base64 and UTF-8?
UTF-8 is a character encoding for Unicode text. Base64 is a binary-to-text encoding scheme. UTF-8 represents text characters; Base64 represents binary data as text.
How to Use Base64 Encode/Decode
Base64 encoding turns binary data into plain text made of 64 safe ASCII characters, so it can travel through text-only systems such as email, JSON, XML, and data URIs without being corrupted. This tool encodes and decodes Base64 entirely in your browser — nothing you paste is ever uploaded to a server.
- Paste your content into the input box — plain text to encode, or a Base64 string to decode. With Auto mode on, the tool detects the input type and shows the result instantly as you type.
- Turn Auto off if you want manual control, then press Encode or Decode to force the exact conversion you need. This is handy for strings that could be interpreted either way.
- Press Swap to move the result back into the input box, which is useful for chained conversions in either direction.
- Press Copy to send the result to your clipboard, or select part of the output to copy only a portion of it.
Base64 is an encoding, not encryption — anyone can reverse it. Never use it to hide passwords or secrets; use real cryptography for anything sensitive.
Related Tools
- Image to Base64 Convert images to Base64 strings and decode Base64 back to images. Supports PNG, JPG, GIF, WebP, SVG, BMP, ICO. 100% browser-based, no upload.
- Base32 Encoder Decoder Instantly encode text to Base32 or decode Base32 back to text. 100% browser-based, zero data upload. RFC 4648 compliant. Ideal for TOTP secrets, OTP keys, QR code data, and binary-to-text conversion.
- Text to Hex Converter Free online text to hexadecimal converter. Instantly encode ASCII and Unicode text into hex values with space-separated or continuous output. Browser-based, no installation needed.
- Hex to Text Converter Convert hexadecimal strings to readable text instantly. Decode hex values into ASCII or UTF-8 text with support for multiple formats.
- Text to Binary Converter Convert text to binary code instantly. Free online UTF-8 binary translator with real-time conversion.
- URL Encode Decode Parse Free online URL encoder, decoder, and parser. Convert text to percent encoding, decode URL strings, parse URL components, and extract query parameters instantly.
- Hex Viewer View file contents in hex dump format with search, offset navigation, and virtual scrolling
- AES Encryption / Decryption AES encrypt/decrypt with CBC, CFB, CTR, OFB, ECB modes, Pkcs7/ZeroPadding/NoPadding, 128/192/256-bit keys, Base64 output, auto-detect key/IV format