Skip to content

Use this result well

Inputs that matter
Text to encode, with a standard or URL-safe alphabet and a padding option.
Output to expect
Base64 representing the entered text as UTF-8 bytes.
How it works
The result updates as you type. Choose the alphabet and padding expected by the receiving system.
  • Match the alphabet and padding expected by the receiving system. Text decoding is not a general binary-file decoder.
  • Base64 is an encoding, not encryption. Use the decoder when you want to recover encoded text.
  • Text input is limited to 2,000,000 UTF-16 units and each result to 20,000,000. Large conversions can be cancelled or retried.

Choose your path

Built around the job you need to finish

Encode exact Unicode text as UTF-8 using RFC 4648 standard or URL-safe Base64, with explicit padding policy and a visible boundary that encoding is not encryption or secret protection.

API developer encoding a non-secret text field

Choose the exact standard/URL-safe alphabet and padding policy required by the receiving protocol.

Keep encoder mode explicit, select alphabet/padding, enter Unicode text, compare bytes/output and save the stated mode.

The receiver decodes the same UTF-8 text and the Project record captures the variant.

Security reviewer handling credentials or tokens

Stop Base64 from being recommended as confidentiality, hashing, integrity or authentication.

Read the boundary warning, avoid entering secrets, and route protection requirements to the real protocol/security design.

No reversible encoded string is accepted as protected data.

International and accessibility tester

Verify CJK, accents, emoji, malformed UTF-16, strict UTF-8 decode and named controls.

Run round trips and invalid inputs, inspect errors, use keyboard controls and save only bounded output.

Valid text round-trips exactly while malformed surrogates and non-UTF-8 bytes fail explicitly.

Was this tool helpful?

Reference & details

How it works

Base64 Encoding Process

Input bytes are grouped into 24-bit chunks, split into four 6-bit values, and mapped to ASCII characters A–Z, a–z, 0–9, +, and /. Padding with = completes partial groups.

Output length ≈ ⌈(input bytes × 4) ÷ 3⌉

Unicode Handling

Text is first encoded to UTF-8 bytes before Base64 conversion, ensuring emoji, CJK characters, and accented letters encode correctly — not limited to ASCII input.

URL-Safe Base64 Variant

Standard Base64 uses + and / which require URL encoding in query strings. URL-safe variants replace + with - and / with _, and often omit padding — common in JWTs and web tokens.

Updated: July 2026

Example Scenarios

Encode the literal training value demo-client:sample only to verify a receiving system's documented Base64 alphabet and padding convention; never treat the output as protected.

Input: demo-client:sample

ZGVtby1jbGllbnQ6c2FtcGxl

Encode a small SVG icon as a Base64 data URL for embedding in HTML or CSS.

Input: <svg>...</svg>

Raw Base64 text; add a data-URL media type only when the consuming specification requires it

A developer Base64-encodes a small JSON filter object to pass safely in a URL query string.

Input: {"status":"active","limit":10}

eyJzdGF0dXMiOiJhY3RpdmUiLCJsaW1pdCI6MTB9

Common Mistakes to Avoid

Confusing Base64 encoding with encryption

Base64 is encoding, not encryption. Anyone can decode it instantly. Never use Base64 alone to protect passwords, API keys, or sensitive data.

Using Base64 on already-encoded data

Double-encoding inflates size and breaks decoding. Encode raw text or binary once. If the input looks like random letters ending in =, decode first before re-encoding.

FAQ

Base64 converts binary data into ASCII text for email attachments, JSON/XML payloads, data URLs, JWT segments, and HTTP Basic Auth headers. It is not encryption — just a transport-friendly representation.

Yes. Text is converted to UTF-8 bytes before encoding, so emoji, Chinese characters, and accented letters encode and decode correctly.

Padding characters (=) fill incomplete 3-byte groups. One = means two input bytes; two = means one input byte. Padding ensures decoders can reconstruct the original byte length.

The transform runs in the loaded browser page, but Base64 provides no secrecy and copied or saved output may persist elsewhere. Do not enter credentials or personal data merely because the calculation is local.

Base64 expands binary data by roughly 33% — every 3 bytes become 4 ASCII characters, plus optional padding. A 1 KB file encodes to about 1.37 KB. This overhead is the trade-off for text-safe transport.

About Base64 Encoder

Convert plain text to Base64 encoding for APIs, data URLs, and safe transport of binary data over text-only channels. Supports Unicode characters and runs entirely in your browser for privacy.