Base64 Encoder / Decoder
Encode text to Base64 and decode it back — with UTF-8 support.
About this tool
Convert any text to Base64 and back. Handles Unicode (emoji, accents) correctly using UTF-8, so decoded output always matches the original.
How it works
Text is converted to UTF-8 bytes, then grouped into 24-bit chunks and mapped to the 64-character alphabet with "=" padding. Decoding reverses the process. Using TextEncoder/TextDecoder guarantees Unicode correctness.
How to use Base64 Encoder / Decoder
- 1Type or paste text into either the plain-text or Base64 field.
- 2The other field updates instantly in the matching direction.
- 3Use "swap" to flip which side you are editing.
- 4Copy or download either result.
Examples
"Hello World" encodes to "SGVsbG8gV29ybGQ=".
The emoji "🚀" encodes correctly to a UTF-8-safe Base64 string.
Decoding "dG9vbGNyYWZ0" gives "toolcraft".
Pro tips
- For binary files, use an image tool instead — this encoder is for text.
- The "=" padding at the end is normal and can be stripped by some systems.
- Paste Base64 with line breaks — the tool removes whitespace automatically.
Frequently asked questions
What is Base64?
A binary-to-text encoding that represents 8-bit data using 64 printable characters. It is common for embedding data in HTML, CSS, emails and JSON.
Why does the emoji come out longer?
Emoji take 4 bytes in UTF-8, and Base64 grows bytes by ~33%, so multi-byte characters appear noticeably longer. This is correct behaviour.
Is my text stored or sent anywhere?
No. Encoding happens entirely in your browser.
Advertisement
Related tools
JSON Formatter
PopularPretty-print, validate and minify JSON — securely in your browser.
Encode and decode URLs, query strings and components.
Generate SHA-256, SHA-384 and SHA-512 hashes.
