Base64 Encode / Decode
Paste text to encode it to Base64, or paste Base64 to decode it back to text. It handles emojis and every language correctly.
Reviewed by the ToolNestr Editorial Team — July 2026
How Base64 encoding works
Base64 encoding converts binary data into a string of 64 safe ASCII characters (A–Z, a–z, 0–9, +, /). Every 3 bytes of input (24 bits) are split into four 6-bit groups, each mapped to one of the 64 characters.
If the input length is not a multiple of 3, padding characters (=) are added to make the output length a multiple of 4. URL-safe mode replaces + and / with - and _ and removes padding for safe inclusion in URLs.
Worked example
Encoding the word "ToolNest" to Base64.
Base64 usage by scenario
How often developers reach for Base64 across common tasks.
Priya Sharma
Full-stack developer who encodes JSON payloads to Base64 before sending them in API requests and decodes responses during debugging.
Marcus Chen
DevOps engineer who uses Base64 to encode Kubernetes secrets and config maps for safe inclusion in deployment manifests.
Emily Torres
Web designer who inlines small icons and fonts as Base64 data URIs to reduce HTTP requests and improve page load speed.
James Wilson
Security engineer who inspects Base64-encoded JWT tokens and Basic Auth headers to verify authentication flows.
| Variant | Characters used | Padding |
|---|---|---|
| Standard | A–Z, a–z, 0–9, +, / | = or == required |
| URL-safe | A–Z, a–z, 0–9, -, _ | Optional (usually omitted) |
| MIME | A–Z, a–z, 0–9, +, / | = or ==, with 76-char lines |
| Base64url | A–Z, a–z, 0–9, -, _ | No padding |
How to use Base64 Encoder / Decoder
Paste your input
Type or paste the text or Base64 string you want to convert into the top text area.
Choose an action
Click Encode to convert text to Base64, or Decode to convert Base64 back to text. Toggle URL-safe as needed.
Copy the result
Use the Copy button to grab the output and paste it into your code, config file, or API request.
Tips for Base64 encoding
Enable URL-safe mode for web usage
When your Base64 string will appear in a URL query parameter, always enable URL-safe mode. It replaces + and / with - and _ and strips padding so the string works without percent-encoding.
Copy the complete string
Base64 strings can be long. Use the Copy button rather than selecting text manually to avoid truncation. A partial string will produce garbled output when decoded.
Base64 is not encryption
Anyone can decode Base64 instantly — it provides no security. Never use it to protect sensitive data. For real security, use proper encryption like AES or TLS.
Security and privacy considerations for Base64
Base64 is not encryption
This is the most critical distinction to understand. Base64 is an encoding scheme, not a cipher. Anyone who receives a Base64 string can decode it instantly with no key or secret required. Tools like this one make decoding trivial. Never use Base64 to protect passwords, API keys, personal data, or any confidential information. For real security, use established encryption algorithms such as AES-256, and always transmit sensitive data over TLS connections.
Data size overhead from encoding
Base64 encoding increases data size by approximately 33 percent. Three bytes of input become four characters of output. For small strings like short JSON payloads or JWT tokens this overhead is negligible, but for large data sets or repeated encoding in performance-critical paths, the size increase can become significant. Consider this when embedding Base64 data in database columns, network responses, or configuration files.
Client-side privacy guarantee
This tool processes all data entirely within your browser using JavaScript's built-in btoa() and atob() functions. No text you paste is ever transmitted to a server, logged, or stored. You can verify this by using your browser's developer tools network tab while encoding or decoding. Your data never leaves your device, which makes this tool safe for use with sensitive but non-critical text that simply needs format conversion.
URL safety and data integrity risks
Standard Base64 uses + and / characters, which have special meaning in URL query strings. Including unescaped Base64 in URLs can cause truncation or misinterpretation by web servers and parsing libraries. Always use URL-safe Base64 (replacing + with - and / with _) when including encoded data in URLs, query parameters, or file names. This tool provides a URL-safe toggle to handle this automatically and prevent data corruption.
Frequently asked questions
What is Base64?
Base64 is a way of representing binary data or text using 64 safe characters. It is often used to embed data in URLs, emails, JSON or HTML.
Does it support emojis and other languages?
Yes. The tool uses UTF-8, so emojis, accents and non-Latin scripts encode and decode correctly.
Why do I get a "could not decode" message?
The input isn't valid Base64. Check for missing characters, extra spaces, or that you actually pasted Base64 and not plain text.
Is my data private?
Yes. Everything is processed in your browser — nothing is uploaded.
What is URL-safe Base64?
Standard Base64 uses + and / characters which can cause issues in URLs. URL-safe mode replaces them with - and _ and removes padding for safe inclusion in query strings.
Can I encode binary files?
This tool works with text input. For encoding binary files (images, documents), you would typically use a dedicated file-to-Base64 tool or a programming library.
What should I do if decoding fails?
Check that the input hasn't been truncated, contains no extra whitespace or line breaks, and is actually Base64-encoded text.
Is Base64 the same as encryption?
No. Base64 is an encoding scheme, not encryption. It transforms data into a safe text format but provides no security — anyone can decode it back to the original text instantly.
Why does my Base64 string end with = or ==?
Padding characters (=) are added to make the output length a multiple of 4. URL-safe mode removes them since the length can be inferred from the content.
Can I encode multiple values at once?
Yes. Paste any amount of text — the tool encodes or decodes the entire input in one go.