About this tool
Base64 encoding turns arbitrary binary or text data into a plain ASCII string using 64 printable characters, which makes it safe to embed in places that only accept text — URLs, JSON payloads, email attachments, or HTML data URIs. This tool encodes and decodes Base64 entirely client-side, with full support for Unicode text (emoji, accented characters, non-Latin scripts).
How to use it
- 1Choose "Encode" to convert plain text to Base64, or "Decode" to convert Base64 back to plain text.
- 2Paste your text into the input box — the output updates automatically.
- 3Click "Swap" to flip the output back into the input for round-trip testing.
- 4Click "Copy" to copy the result to your clipboard.
Common mistakes to avoid
- Trying to decode a string that isn't valid Base64 (wrong length, invalid characters) — this will show an error.
- Confusing Base64 with encryption. Base64 is an encoding, not a cipher — anyone can decode it, it provides no security.
- Forgetting that standard Base64 uses +, /, and = characters, which aren't URL-safe without further encoding.
Use cases
- Embedding a small image or font as a data URI directly in CSS or HTML.
- Encoding credentials or tokens for HTTP Basic Auth headers.
- Passing binary-safe data through systems that only accept text, like JSON fields or query parameters.
- Debugging a JWT or API payload that contains a Base64-encoded segment.
Frequently asked questions
Is Base64 encoding the same as encryption?
No. Base64 is a reversible encoding scheme, not encryption — anyone with the encoded string can decode it instantly. Never use Base64 alone to protect sensitive data.
Does this tool support Unicode and emoji?
Yes. Text is UTF-8 encoded before Base64 conversion, so accented characters, emoji, and non-Latin scripts round-trip correctly.
Why did decoding fail on my string?
Base64 strings must have a length that's a multiple of 4 (padded with = if needed) and only contain valid Base64 characters (A-Z, a-z, 0-9, +, /, =). A truncated or corrupted string will fail to decode.