Base64 Encode / Decode
Encode and decode Base64 for text and files, with URL-safe output and correct UTF-8 handling.
How to use it
- Choose the direction: Encode (text → Base64) or Decode (Base64 → text).
- Paste your input, or use Encode a file to read a whole file into a Base64 string.
- For URLs or filenames, tick URL-safe to swap
+and/for-and_and drop padding. - Copy the result or download it.
Common use cases
- Embedding small assets — turn an icon or font into a
data:URI inside CSS or HTML. - Decoding JWT segments and API tokens — the middle payload of a JWT is Base64URL JSON.
- Sending binary over text-only channels — email attachments and some webhooks need a textual envelope.
- Testing with Chinese and emoji — many online tools mangle UTF-8; this one encodes and decodes your non-ASCII text losslessly because it runs through
TextEncoder/TextDecoder.
FAQ
Q: What is the difference between standard and URL-safe Base64?
A: Standard Base64 can include +, / and = padding, which have special meaning inside URLs. URL-safe output replaces + → -, / → _, and trims padding.
Q: Is Base64 encryption? A: No. Base64 is only an encoding — anyone can decode it instantly. Never put secrets in Base64 and assume they are safe.
Q: Why do my Chinese characters turn into "?" elsewhere?
A: The input was almost certainly decoded with a single-byte charset. This tool uses UTF-8 end-to-end, so 中文 round-trips correctly.
Your data stays on this device
Base64 Encode / Decode runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.
Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.