Base64 Encoder / Decoder
Browser processing — files never leave your device
Convert text to Base64 and back. Unlike naive implementations, this handles UTF-8 correctly, so emoji and non-Latin text round-trip safely.
Loading tool…
How to use this tool
- Paste text (to encode) or a Base64 string (to decode).
- Click Encode or Decode.
- Copy the output.
- For images, use the dedicated Image to Base64 tool instead.
About this tool
Base64 turns arbitrary bytes into a safe alphabet of letters, digits, + and /, which is why it appears in HTTP headers, JWTs, email attachments and data URIs. JavaScript's raw btoa() breaks on any character outside Latin-1; this tool encodes the text as UTF-8 bytes first, so "héllo 👋" encodes and decodes without corruption. Note that Base64 is an encoding, not encryption — anyone can decode it.
Frequently asked questions
- Is Base64 encryption?
- No. It's a reversible encoding with no key — anyone can decode it. Never use Base64 alone to protect secrets.
- Why did emoji break when I used btoa() in my code?
- btoa() only accepts Latin-1 characters. Encode the string as UTF-8 bytes first (as this tool does) — in modern JS, via TextEncoder.
- What are the = signs at the end of Base64?
- Padding. Base64 works in 3-byte groups; = fills out the final group when the input length isn't a multiple of three. Decoders handle it automatically.
Related tools
Image to Base64Encode an image as Base64 and copy it as a raw string, a data URI, an HTML <img> tag or a CSS background rule.Base64 to ImagePaste Base64 image data — with or without the data URI prefix — to preview it and download it as a normal image file.URL Encode/DecodePercent-encode text for URLs, or decode %20-style strings back into readable text. Choose component encoding (strict) or full-URL encoding.