Base64 Encoder / Decoder

Encode text to Base64 or decode Base64 — converts instantly as you type

Mode
Plain Text
Ctrl+Enter to convert
Base64

          

Output will appear here
Paste or type on the left

Input: -
Output: -
Ratio: -

Free Online Base64 Encoder and Decoder

Convert text to Base64 or decode Base64 back to plain text instantly with our free online Base64 encoder decoder. Conversion happens in real time as you type — no button clicks needed. All processing runs entirely in your browser using JavaScript — your data never leaves your device.

How to Use

  1. Select Encode to convert plain text to Base64, or Decode to convert Base64 back to text
  2. Paste or type your input on the left
  3. The result appears instantly on the right
  4. Click Copy Output to copy the result to your clipboard
  5. Use Swap to flip input and output and continue working in the other direction

Features

What is Base64?

Base64 is an encoding scheme that converts binary data (including text) into a string of ASCII characters. It uses a 64-character alphabet — A–Z, a–z, 0–9, and the characters + and / — to represent any binary sequence. The output is padded with = characters to make its length a multiple of 4.

Base64 was designed to transmit binary data over channels that only handle plain text. A common example is sending files as email attachments or embedding images directly in HTML/CSS using data URIs. It is also widely used in HTTP Basic Authentication headers, JSON Web Tokens (JWTs), and API keys.

Base64 Encoding Example

Plain text input:

Hello, World!

Base64 encoded output:

SGVsbG8sIFdvcmxkIQ==

Base64 Decoding Example

Base64 input:

eyJ1c2VyIjoiYWxpY2UiLCJyb2xlIjoiYWRtaW4ifQ==

Decoded plain text:

{"user":"alice","role":"admin"}

Common Uses of Base64

Base64 vs Base64url

Standard Base64 uses + and / characters, which have special meaning in URLs. Base64url replaces them with - and _ respectively, making the output safe to use in URLs and filenames without percent-encoding. JWT tokens use Base64url. This tool uses standard Base64.

Frequently Asked Questions

Is Base64 encryption?
No. Base64 is an encoding, not encryption. It is fully reversible by anyone without a key. Do not use Base64 to protect sensitive data — use actual encryption for that. Base64 is for making binary data safe to transmit as text.
Is my data safe?
Yes. All encoding and decoding happens entirely in your browser using JavaScript. Your input is never sent to any server. This tool works offline too.
Why does Base64 output end with = or ==?
Base64 encodes 3 bytes as 4 characters. If the input length isn't divisible by 3, the output is padded with = signs to reach the next multiple of 4. One = means 2 input bytes were in the last group; two == means 1 byte was in the last group.
Why does Base64 make data larger?
Base64 encodes every 3 bytes of input as 4 characters of output — a ~33% size increase. This overhead is the trade-off for making binary data safe to transmit over text-only channels.
What is a data URI?
A data URI embeds file content directly in HTML or CSS instead of linking to an external file. Example: src="data:image/png;base64,iVBORw0KGgo...". Useful for small images that would otherwise require an extra HTTP request.
Can this tool decode JWT tokens?
Partially. JWT tokens use Base64url (not standard Base64) and consist of three dot-separated parts. You can decode each part individually after replacing - with + and _ with /. For full JWT inspection, use a dedicated JWT decoder.