Base64 Encoder / Decoder
Convert text to Base64 and back. Unlike naive tutorials, this tool encodes UTF-8 correctly, so accents, Chinese characters and emoji survive the round trip intact.
Why most online Base64 tools break on emoji
The browser's built-in btoa and atob functions only understand Latin-1 bytes, so feeding them "héllo" or "你好" throws an error or produces mojibake. This page first converts the string to a UTF-8 byte array with TextEncoder, encodes those bytes, and reverses the process with TextDecoder on the way back. That matches what modern servers and APIs expect, making the output directly usable in HTTP Basic auth headers, data URIs, and JSON payloads.
Common uses: building Authorization: Basic … headers while debugging, embedding small assets as data: URIs, inspecting tokens found in logs, or obfuscating (not securing!) values in configuration files. Remember that Base64 is an encoding, not encryption — anyone can decode it, so never treat it as protection for real secrets.
FAQ
- Is Base64 secure?
- No. It is reversible by anyone in milliseconds. Use it to transport binary-safe text, never to hide secrets.
- Can I decode a data: URI with this?
- Yes — paste just the Base64 part after the comma. For images, a viewer shows the decoded bytes are valid if decoding prints text; use an image tool for binary files.
- Does it upload my text?
- Never. Encoding runs in this tab; there is no backend.