Convert text to Base64 and back. Unlike many online encoders, this one is UTF-8 safe, so emoji, accents, and non-Latin scripts survive the round trip intact.
How to use this tool
- Pick Encode or Decode.
- Paste your text or Base64 string into the box.
- The result appears instantly — click Copy to grab it.
- Use Swap to feed the result straight back in and reverse the operation.
URL-safe Base64 (base64url)
Standard Base64 uses +, /, and =, which all have special meaning inside URLs. Tick URL-safe and the tool emits base64url instead: + becomes -, / becomes _, and trailing = padding is dropped. This is the encoding used by JSON Web Tokens and most modern APIs.
Decoding accepts both variants automatically, so you never have to say which one you pasted.
Tips
- Base64 is encoding, not encryption. Anyone can decode it in a second — never use it to hide passwords or secrets.
- Base64 grows data by roughly 33%. That is fine for small payloads, but it makes large files noticeably heavier.
- Decoding a huge string can briefly freeze the tab. Work in chunks if you are handling megabytes.
- Need to embed an image instead? Use the Image to Base64 tool, which produces a ready-to-paste data URI.
Related tools
- Image to Base64 — turn an image into a data URI
- URL encoder & decoder — percent-encoding for query strings
- JWT decoder — reads base64url-encoded tokens
- Hash generator — one-way digests, unlike reversible Base64
FAQ
Is my text uploaded anywhere?
No. Encoding and decoding both run in your browser using the built-in TextEncoder and btoa/atob functions. Nothing is sent to a server, and nothing is logged.
Why do other Base64 tools break my emoji?
Because btoa throws on any character above U+00FF. Tools that ignore this either crash or silently mangle the output. This one converts your text to UTF-8 bytes first, so emoji and accented characters encode correctly.
What is the difference between Base64 and base64url?
They encode the same bytes but use a different alphabet for the last two characters. Base64 uses + and /; base64url uses - and _ so the result can be dropped into a URL or filename without further escaping.
Can I decode a Base64 image?
This tool returns text. If you paste image bytes you will get unreadable characters. To view a Base64 image, paste the full data:image/png;base64,... URI into your browser's address bar instead.
Is Base64 secure?
No. It is a reversible transformation with no key, so it offers zero protection. If you need secrecy, use encryption; if you need integrity, use a hash.
More developer tools
- HTML Entity Encoder & DecoderEscape HTML so tags display as text, or decode entities back into characters. Supports all HTML5 named entities, in your browser.
- JWT DecoderDecode a JSON Web Token to read its header, payload, and expiry. Runs entirely in your browser — the token is never sent anywhere.
- Regex TesterTest a regular expression against sample text and see every match, capture group, and named group. Live results, no server round trip.
- URL Encoder & DecoderPercent-encode text for URLs or decode an encoded URL back to readable text. Choose component or whole-URL mode, all in your browser.