Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text, right in your browser. Supports Unicode characters with character and byte counts.
0 chars
0 chars
What is Base64 Encoder / Decoder?
Base64 is an encoding scheme that converts binary data into a text format using 64 printable ASCII characters. It's widely used to embed images in HTML/CSS, encode data in JWTs, transmit binary data in JSON, and attach files in email.
How to use
- 1 Type or paste your text into the left textarea.
- 2 Click 'Encode →' to convert plain text to Base64.
- 3 To decode, paste a Base64 string into the right textarea and click '← Decode'.
- 4 The character count and byte size update automatically.
- 5 All processing happens in your browser — no data is sent to a server.
Formula
Example calculation
The text 'Hello' encodes to 'SGVsbG8='. The '=' padding character is added to make the output length a multiple of 4.
Frequently asked questions
Why does Base64 end with = or ==?
The = sign is padding. Base64 works in 3-byte groups. If the input isn't a multiple of 3 bytes, one or two = characters are added to pad the output to a multiple of 4 characters.
Does Base64 encrypt my data?
No. Base64 is encoding, not encryption. Anyone can decode it instantly. Use it for data transport, not security.
What is URL-safe Base64?
Standard Base64 uses + and / which have special meanings in URLs. URL-safe Base64 replaces + with - and / with _, making it safe to use in URLs and filenames.
How much does Base64 increase file size?
Base64 increases data size by about 33% — 3 bytes become 4 characters. A 1 MB file encodes to about 1.37 MB.
Can I encode images with this?
This tool encodes text strings. To embed an image in HTML, you'd encode the raw binary file as Base64, which requires a file reader — not a plain text encoder.