Skip to content
ToolZone

Base64 Encode/Decode

Encode plain text into Base64 format, or decode Base64 back into readable text, commonly used for embedding binary-safe data in JSON, URLs, and APIs.

Runs in your browser. Nothing you enter or upload leaves your device.

Result appears here

Text is encoded as UTF-8, so emoji and accents round-trip correctly. Everything runs in your browser.

Keyboard shortcuts

Run the main action
⌘ / Ctrl + Enter
Copy the result
⌘ / Ctrl + Shift + Enter
Download the result
⌘ / Ctrl + S
Paste a file or image into file tools
⌘ / Ctrl + V
Search all tools
⌘ / Ctrl + K
Show these shortcuts
?

You can also drop files anywhere on the page.

About the Base64 Encode/Decode

This Base64 Encode/Decode tool converts plain text into Base64 and back. It handles UTF-8 correctly, so accented letters, non-Latin scripts, and emoji survive the round trip.

How it works

Encoding first converts your text to UTF-8 bytes. Every three bytes (24 bits) are split into four 6-bit groups, and each group is mapped to one of 64 characters: A to Z, a to z, 0 to 9, + and /. If the byte count is not a multiple of three, the output is padded with one or two = signs. The result is about 33 percent longer than the input.

Decoding accepts standard and URL-safe Base64 (with - and _), with or without = padding, and ignores whitespace and a data: URL prefix. The bytes are then checked: if they are valid UTF-8 they are shown as text; otherwise the tool recognizes common file types such as PNG, JPEG, GIF, WebP, PDF and ZIP from their first bytes, previews images and offers the file as a download.

How to use

  1. 1

    Choose Encode or Decode.

  2. 2

    To encode, type text or drop a file; to decode, paste the Base64.

  3. 3

    Pick options such as URL-safe, line wrapping or data: URL.

  4. 4

    Copy the result, download the decoded file, or click Swap to reverse it and check the round trip.

Worked examples

Simple text

Encoding a greeting.

Input
Hello, World!
Result
SGVsbG8sIFdvcmxkIQ==

Basic Auth credentials

Building an Authorization header value.

Input
user:pass
Result
dXNlcjpwYXNz

The header would be: Authorization: Basic dXNlcjpwYXNz

Accented text

Encoding a word with é.

Input
café
Result
Y2Fmw6k=

é is two bytes in UTF-8, so the result reflects five bytes in total.

Limitations
Files up to 50 MB can be encoded; very large outputs may make the page slow to copy. Decoded binary files are identified only for common types; others download as .bin. Text is always treated as UTF-8.
Assumptions
Text is encoded and decoded as UTF-8.
Privacy
Encoding and decoding run locally in your browser; nothing is sent to a server.

Frequently asked questions

Is Base64 encoding a form of encryption?+

No. It is an encoding, not encryption, and anyone can reverse it without a key.

Why does the output end with = signs?+

Base64 works in 3-byte blocks. When the input does not divide evenly, = padding fills out the last block.

Does it support emoji and non-English text?+

Yes. Text is converted to UTF-8 bytes before encoding and decoded as UTF-8.

Why is the Base64 version longer than my text?+

Every 3 bytes become 4 characters, so Base64 output is about 33 percent larger than the input.

Can I encode an image file here?+

Yes. Drop any file onto the encode box to get its Base64, or tick As data: URL to get a ready-to-use data URL.

Related tools