Base64 Encoder & Decoder
Encode text to Base64 and decode Base64 back to text online for free. UTF-8 safe, URL-safe alphabet option, line wrapping. Runs locally, nothing is uploaded.
How to use Base64 Encoder
- Paste text (to encode) or Base64 (to decode) into the input box.
- Tick URL-safe if the output goes into a URL, or Wrap at 76 for email-style output.
- Click Encode or Decode, then copy or download the result.
Base64 turns binary and non-ASCII text into plain ASCII — the glue of data URLs, JWTs, basic auth and email attachments. This encoder is UTF-8 safe (emoji and non-English text survive the round trip), unlike naive browser snippets that corrupt them, and it validates on decode instead of silently producing garbage. A URL-safe mode swaps in the - and _ alphabet used by JWTs and web tokens.
More tools on Dev Toolbox
FAQ
Why does my emoji survive here but break in other tools?
Many quick Base64 snippets feed raw UTF-16 code units to btoa, which corrupts anything outside ASCII. This tool encodes proper UTF-8 first, so emoji and Chinese, Arabic or accented text round-trip exactly.
What is URL-safe Base64?
Standard Base64 uses + and /, which have special meaning in URLs. URL-safe Base64 replaces them with - and _ and drops the = padding — the alphabet JWTs use.
Is Base64 encryption?
No — it is just an encoding, trivially reversible by anyone. Never use it to hide secrets; use it to transport data safely.