Base64 Encoder – Encode & Decode Text Online

Encode any text to Base64, or paste a Base64 string and decode it back to text. Full UTF-8 support, URL-safe Base64, and optional MIME line wrapping. Free, private, and runs entirely in your browser.

Input

Text → Base64

Tip: Base64 is an encoding, not encryption. Anyone can decode the output — never use it to protect sensitive data.

Result

Waiting for input
Base64
—

What is Base64 encoding?

Base64 is a binary-to-text encoding scheme that represents binary data using only 64 printable ASCII characters: A–Z, a–z, 0–9, +, and /, with = used for padding. It was designed so that binary data could travel safely through text-only channels like email, JSON, XML, and URLs, where certain byte values might be interpreted as control characters or break the format.

Each Base64 character encodes exactly 6 bits of data. Four Base64 characters encode 3 bytes (24 bits) of the original input, which means the encoded output is always about 33% larger than the source. That overhead is the price of encoding arbitrary binary data as safe ASCII text.

Everything runs locally in your browser. The text you enter never leaves your device, there's no signup, and there are no usage limits.

Base64 is encoding, not encryption

This is the single most common misconception about Base64. Base64 is not encryption. It's a reversible encoding with no key: anyone can take a Base64 string and decode it back to its original form without any secret. If you see something that looks like Base64 and you need the plaintext, this tool — or any of hundreds of others — will do it instantly.

Use Base64 to safely transport binary data through text channels, or to embed small images directly in HTML and CSS as data URIs. Do not use it to protect passwords, tokens, or personal information — that requires real encryption like AES or ChaCha20, ideally over TLS in transit.

URL-safe Base64 and MIME line wrapping

Standard Base64 uses + and /, which have special meanings in URLs and query strings. RFC 4648 §5 defines a URL-safe variant (also called Base64url) that replaces + with - and / with _, and typically strips the trailing = padding. This variant is used in JWTs, OAuth tokens, and anywhere a Base64 string has to sit inside a URL without escaping.

MIME line wrapping inserts a newline every 76 characters in the output, matching the format defined in RFC 2045 for email attachments and PEM certificates. Enable it if you're producing Base64 for those contexts; leave it off for compact storage or transmission over JSON.

VariantAlphabetPaddingTypical use
StandardA–Z a–z 0–9 + /Yes (=)Email, JSON, general data transport
URL-safeA–Z a–z 0–9 - _Usually strippedURLs, JWT, OAuth, filenames
MIMEA–Z a–z 0–9 + /YesWrapped at 76 chars for email and PEM

Frequently asked questions

Base64 is a binary-to-text encoding scheme that represents binary data using only 64 printable ASCII characters (A–Z, a–z, 0–9, +, and /). It is commonly used to safely transmit binary data through text-based channels like email, JSON, XML, and URLs. The '64' refers to the size of the character set — each Base64 character encodes 6 bits of data.
No. Base64 is an encoding, not an encryption. Anyone can decode a Base64 string back to its original form without a key. Never use Base64 to protect sensitive data — use proper encryption like AES for that.
Base64 encodes 3 bytes of input into 4 characters of output. When the input length is not divisible by 3, padding with '=' characters fills the final group. One '=' means the input was 1 byte short of a multiple of 3, and two '=' means it was 2 bytes short. URL-safe Base64 usually strips the padding.
Standard Base64 uses '+' and '/' characters, which have special meanings in URLs. URL-safe Base64 (also called Base64url) replaces '+' with '-' and '/' with '_', and typically strips the trailing '=' padding. It is defined in RFC 4648 §5 and is used in JWTs, OAuth tokens, and other URL-embedded formats.
Yes. The tool encodes text as UTF-8 bytes before Base64 conversion, so emojis, accented letters, and non-Latin scripts like Hindi, Chinese, and Arabic all work correctly.
Line wrapping inserts a newline every 76 characters in the output, matching the MIME (RFC 2045) format used in email attachments and PEM certificates. Enable it if you are producing Base64 for MIME-compliant contexts.
Yes, completely free. No signup, no watermark, no hidden charges. Encode and decode as much as you want for personal or commercial use.
Absolutely. Everything runs in your browser. The text you enter never leaves your device — there is no server processing, no logging, and no data storage.