πŸ’» Developer Tools

Base64 Encode / Decode

Encode text to Base64, or decode a Base64 string back to readable text. Handles Unicode (UTF-8) and URL-safe Base64. Everything runs in your browser β€” nothing leaves your device.

Examples (click to try)
(Type or paste something above to see the result)

How to use Base64 Encode / Decode

New here? Start by clicking one of the Examples (click to try) buttons just above the input. A sample is filled in, the encode/decode direction switches automatically, and the result shows up right away. Once you're comfortable, type or paste your own text into the box above, then click Encode or Decode β€” the result appears instantly. Use the segment buttons to switch between modes.

Example: in Encode mode, typing Hello, δΈ–η•Œ produces SGVsbG8sIOS4lueVjA==. Conversely, in Decode mode, pasting that same SGVsbG8sIOS4lueVjA== gives back the original Hello, δΈ–η•Œ. When you paste a Base64 string, the direction is detected automatically β€” you don't have to flip the toggle yourself.

  • Encode: Converts your input text into a Base64 string. Unicode characters are handled correctly via UTF-8.
  • Decode: Converts a Base64 string back to the original text. An error message is shown if the input contains invalid characters.
  • URL-safe: Replaces + with - and / with _. Useful when the result will be used in a URL parameter or filename.
  • β‡… Swap: Moves the result into the input field so you can immediately run the reverse conversion.

Common use cases

  • Generating or inspecting HTTP Basic Auth headers (Authorization: Basic {base64})
  • Checking MIME-encoded email content or Base64 attachments
  • Creating or decoding data URI schemes (data:text/plain;base64,…)
  • Decoding the payload section of a JWT (JSON Web Token), which uses Base64url encoding

Frequently Asked Questions

Is my input sent to any server?
No. All encoding and decoding is performed entirely within your browser. Your input is never transmitted to or stored on any external server, so it is safe to use with sensitive data.
Does it support Unicode and non-ASCII characters?
Yes. Text is first converted to UTF-8 bytes before Base64 encoding, so characters from any language, including emoji and CJK scripts, are handled accurately.
What is URL-safe Base64?
URL-safe Base64 replaces the '+' and '/' characters used in standard Base64 with '-' and '_' respectively, making the output safe to use in URL query parameters and filenames. Enable the 'URL-safe (+/β†’-_)' checkbox to activate this mode automatically.