Base64 Encoder / Decoder
Encode and decode Base64 strings online. Supports text and URL-safe Base64 encoding.
What Is Base64 Encoding?
Base64 converts binary data into a set of 64 printable ASCII characters (A-Z, a-z, 0-9, +, /). This makes it safe to embed binary content — images, certificates, cryptographic keys — inside text-only formats like JSON, XML, email (MIME), and data URIs.
When to Use Base64
Embed small images directly in HTML or CSS with data URIs. Transport binary payloads through APIs that only accept text. Encode authentication credentials in HTTP Basic Auth headers. Store binary blobs in configuration files or environment variables.
URL-Safe Base64
Standard Base64 uses + and /, which have special meaning in URLs.
URL-safe Base64 swaps these for - and _ and strips padding
(=). Use this variant when embedding encoded data in query strings or URL paths.
For general URL percent-encoding, see the URL Encoder / Decoder.
Base64 Is Not Encryption
Base64 encoding is reversible by anyone — it provides zero confidentiality. Never use Base64 alone to protect sensitive data like passwords, tokens, or personal information. Pair it with proper encryption (AES, RSA) when security matters. If you need a one-way transformation instead, use the Hash Generator to produce irreversible hashes.
Frequently Asked Questions
- Does Base64 increase file size?
- Yes. Base64 encoding increases size by approximately 33% because it represents every 3 bytes of binary data as 4 ASCII characters.
- Can I encode files with this tool?
- This tool encodes text strings. For file encoding, paste the file's text content into the input field. Binary file encoding support is planned for a future update.