๐Ÿ”

Base64 Encode / Decode

Encode text or files to Base64 and decode Base64 back to text. Supports UTF-8 and URL-safe Base64.

Built and maintained by Abdur Rehman ยท Free, no sign-up

Loading Base64 Encode / Decodeโ€ฆ
๐Ÿ”’PrivateRuns in your browser โ€” nothing is uploaded.
โšกFastInstant results, no waiting in queues.
๐Ÿ’ธFreeNo sign-up, no watermark, no limits.
๐Ÿ“ฑAnywhereWorks on phone, tablet and desktop.

How to use the Base64 Encode / Decode

  1. Paste text or choose a file
  2. Click Encode or Decode
  3. Copy the result

Encode and decode Base64

Paste text and click Encode to Base64, or paste Base64 and click Decode from Base64. Text is handled as UTF-8, so accents, Arabic, Urdu and emoji survive the round trip. Tick URL-safe Base64 to use - and _ instead of + and /, as JWTs and URLs require. You can also drop any file to get it as a Base64 data URL.

Example

โ€œHelloโ€ โ†’ SGVsbG8=. Base64 turns every 3 bytes into 4 characters, so encoded data is about 33% larger. It is an encoding, not encryption: anyone can decode it, and there is no such thing as Base64 โ€œwith a keyโ€. Use real encryption for secrets.

In code and on the command line

  • Python โ€” base64.b64encode(s.encode()).decode() and base64.b64decode(b).decode().
  • JavaScript โ€” btoa() and atob() only handle Latin-1, so encode UTF-8 with TextEncoder first; in Node.js, Buffer.from(s).toString('base64').
  • Java 8+ โ€” Base64.getEncoder().encodeToString(bytes) and Base64.getDecoder().decode(s).
  • PHP โ€” base64_encode() and base64_decode().
  • Linux and macOS terminal โ€” base64 file.txt to encode, base64 -d to decode.
  • C and C++ โ€” there's no standard function; use a library such as OpenSSL's EVP_EncodeBlock.
  • Notepad++ โ€” Plugins โ†’ MIME Tools โ†’ Base64 Encode / Decode.

๐Ÿ’ป Keep exploring Developer Tools

See all Developer Tools