Base64 Encoder / Decoder
Convert text to Base64 and back. Unlike naive implementations, this handles UTF-8 correctly, so emoji and non-Latin text round-trip safely.
Runs in your browser — files never leave your device
Free · No sign-upOutputs Base64, Plain textHow to use Base64 Text
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.
This comes up often when inspecting the payload of a JWT token, decoding a Base64-encoded HTTP header or environment variable, or preparing a short string for a system that expects Base64 as its transport format.
Common ways people use this
- Decoding a Base64-encoded HTTP header or environment variable to see its actual contents
- Inspecting the header or payload segment of a JWT token, which is Base64-encoded
- Encoding a short piece of text for a system that requires a Base64 format
Tips for better results
- Remember that Base64 is not encryption — anyone can decode it back to plain text, so never rely on it alone to protect sensitive data.
- If you're specifically working with images, use the dedicated Image to Base64 or Base64 to Image tools instead, which handle binary image data and MIME types directly.
Frequently asked questions
Is Base64 encryption?
Why did emoji break when I used btoa() in my code?
What are the = signs at the end of Base64?
Can I decode a JWT token with this tool?
What happens if I try to decode text that isn't valid Base64?
Related tools
Other tools people commonly use alongside this one.
Image to Base64
Encode 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 Image
Paste Base64 image data — with or without the data URI prefix — to preview it and download it as a normal image file.
URL Encode/Decode
Percent-encode text for URLs, or decode %20-style strings back into readable text. Choose component encoding (strict) or full-URL encoding.