Base64 Encoder
Paste text to encode to Base64, or Base64 to decode back to text. Toggle URL-safe encoding (− and _ instead of + and /) or upload a file directly. Byte counts for both input and output are shown.
Encoding and decoding happen in your browser. Files are read locally and never uploaded.
How to use this base64 encoder
- Pick Encode or Decode.
- Paste text/Base64 or click 'Encode file' to upload a file (max 5 MB).
- Optionally enable URL-safe mode (replaces + and / with - and _, removes padding).
- Click the action button and copy the result. Byte counts shown for both input and output.
Frequently asked questions
What is URL-safe Base64?
Standard Base64 uses + and /, which conflict with URL syntax. URL-safe Base64 replaces them with - and _ and removes the trailing = padding. Useful for tokens and query strings.
Can I encode an image?
Yes. Click 'Encode file' and upload up to 5 MB. The file's bytes are converted to Base64 — useful for data URLs.
Does it support UTF-8 and emoji?
Yes. The encoder uses TextEncoder so multi-byte characters and emoji are handled correctly.
Is Base64 encryption?
No. Base64 is encoding, not encryption. Anyone with the encoded string can decode it. Do not use it to protect secrets.