Base64 Encoder & Decoder
Convert text to Base64 or Base64 back to text — with full Unicode (UTF-8) support.
Nothing leaves your device. All conversion runs in JavaScript on this page.
About this tool
This free Base64 encoder converts any text into Base64 — the encoding used for HTTP Basic authentication headers, data URIs, JWT payload segments and email attachments. The decoder reverses the process, turning a Base64 string back into readable text, and clearly reports invalid input instead of silently producing garbage.
Both directions handle the full Unicode range correctly (UTF-8), so emoji, Danish characters like æøå and non-Latin scripts encode and round-trip exactly. Everything runs locally in your browser — your data is never uploaded, stored or sent anywhere, which makes it safe for tokens, keys-in-configs you are debugging, and other sensitive strings.
Note: Base64 is an encoding, not encryption. Use it for transport and storage formats, never to protect secrets on its own.
Frequently asked questions
Is Base64 encryption?
No. Base64 is an encoding, not encryption — it provides zero secrecy and anyone can decode it instantly. Use it for transport and storage formats (email attachments, data URIs, JWT segments), never to protect secrets on its own.
Does this tool upload my data anywhere?
No. Encoding and decoding run entirely in JavaScript in your browser. The text you paste never leaves your device, which makes the tool safe for tokens and other sensitive strings you are debugging.
Can it handle Unicode, emoji and Danish characters?
Yes. Both directions use UTF-8 via the TextEncoder/TextDecoder APIs, so æøå, emoji and non-Latin scripts encode and round-trip exactly.
Why does my Base64 string fail to decode?
The three usual causes are: characters outside the Base64 alphabet (A–Z, a–z, 0–9, +, / and =), a length that is not a multiple of 4 (padding is missing or has been trimmed), or a URL-safe variant using - and _ instead of + and /. Whitespace and line breaks are stripped automatically before decoding.
What is URL-safe Base64?
A variant used in JWTs and URLs where + is replaced by - and / by _, usually without padding. This tool decodes the standard alphabet; for URL-safe input, replace - with + and _ with / first, and append = until the length is a multiple of 4.