Base64 Encode / Decode
Encode and decode Base64 with proper UTF-8 handling and a URL-safe mode.
How to use Base64 Encode / Decode
Convert text to Base64 or turn Base64 back into readable text. This tool encodes and decodes through UTF-8, so emoji and international characters survive a round-trip — unlike the classic btoa/atob pair which mangles anything outside Latin-1.
- 01Type or paste your text into the input panel.
- 02Switch between encode and decode; the panels swap automatically so you can keep working.
- 03Turn on url-safe mode when the output will travel in a URL or a JWT — it replaces
+ /with- _and drops the padding.
tips
- —Base64 is not encryption — it is trivially reversible. Never use it to “protect” data.
- —Every 3 bytes of input become 4 characters of output, so encoded data is roughly a third larger than the original.
- —If a decoded string looks garbled, the source was almost certainly encoded with the wrong charset; this tool assumes UTF-8 throughout.
frequently asked
What is Base64?+
Base64 is a binary-to-text encoding scheme that represents binary data using 64 ASCII characters (A–Z, a–z, 0–9, +, /). It is commonly used to embed binary data in JSON, HTML, data URIs, and email (MIME). Every 3 bytes of input becomes 4 characters of output.
Why does my decoded text show garbled characters?+
This usually means the original text was UTF-8 but was decoded as Latin-1. This tool uses the TextEncoder API to handle UTF-8 correctly, so emoji, CJK characters, and other multi-byte text decode properly.
What is URL-safe Base64?+
Standard Base64 uses + and /, which break in URLs. URL-safe Base64 (RFC 4648 §5) replaces them with - and _ and drops the = padding. Toggle the URL-safe mode for tokens, JWTs, and query parameters.
Is this tool free?+
Yes. Encoding and decoding happen entirely in your browser — nothing is sent to a server.