Base64 Encoder

Encode any text to standard Base64 in your browser, emoji and accented letters included.

Updated

Developer ToolsPopular● Free No upload Instant

Loading Base64 Encoder…

Your browser is preparing the tool. It runs 100% locally.

Quick answer

Base64 Encoder turns text into a Base64 string, in your browser. It encodes your text as UTF-8 first, so accents, emoji and non-Latin scripts convert correctly, then writes those bytes in standard Base64 (the A-Z, a-z, 0-9, + and / alphabet). Expect the result to be about 33% larger than the original. Your text stays on your device.

What the Base64 Encoder does

Base64 turns text or bytes into plain ASCII characters that survive systems built for simple text. People use it to put a token in a config file, data in a URL or data URI, or content through a channel that mangles unusual characters.

This encoder is for text. It converts your text to UTF-8 before encoding, so an emoji or an accented letter goes through without the error that naive Base64 tools throw.

How it works

Your text is first turned into UTF-8 bytes, the standard way to represent any character as a sequence of bytes. That step is what lets the encoder accept Unicode rather than only plain ASCII.

Those bytes are then grouped three at a time and mapped to four Base64 characters from the standard alphabet (A-Z, a-z, 0-9, +, /), with = padding at the end. That three-bytes-to-four-characters expansion is why Base64 runs about a third larger than the input.

Data source & conversion logic

  1. Step 1. Type or paste the text to encode. It stays in your browser.
  2. Step 2. The text is converted to UTF-8 bytes (so Unicode and emoji work).
  3. Step 3. Bytes are grouped in threes and mapped to four Base64 characters each.
  4. Step 4. Padding (=) is added so the length is a multiple of four.
  5. Step 5. Copy the standard Base64 output.

Privacy

The text you encode never leaves your browser and no server keeps a copy, so tokens, keys and private strings stay on your machine.

The page saves nothing between visits. Clear the box or close the tab and both the text and its Base64 are gone.

Technical details

DirectionText → Base64
AlphabetStandard Base64 (A-Z a-z 0-9 + /, = padding)
UnicodeFull (text is UTF-8 encoded first)
SizeAbout 33% larger than the input
ScopeText (for files, use Image to Base64)
UploadNone; encoding happens on your device

Standards and references

  • RFC 4648 (Base64): defines the alphabet this tool uses: A-Z, a-z, 0-9, + and /, with = as padding.
  • UTF-8: the text is encoded to UTF-8 bytes before Base64, which is why any Unicode character encodes correctly.

Accuracy and limits

Encoding is exact and reversible: decode the output with a Base64 decoder that also reads UTF-8 and you get your original text back, character for character.

It produces standard Base64, not the URL-safe variant. Standard Base64 uses + and /, which have special meaning in URLs; to drop the string into a URL, swap + for - and / for _ yourself, and you may strip the = padding.

Base64 is an encoding. Anyone can decode it, so it hides nothing and must never be used to protect passwords or secrets. Its job is safe transport.

Every three bytes become four characters, so the output is roughly a third bigger than your text.

Real-world uses

Embed a token or key

Encode a value so it travels as plain ASCII in a config or header.

Build a data URI

Base64 a small snippet to inline in HTML, CSS, or a data URL.

Move text safely

Pass text through a channel that would otherwise mangle special characters.

Encode Unicode

Base64 text with emoji or non-Latin scripts without the usual errors.

When it fits, and when it doesn't

Good for

  • Encoding text (including Unicode) to Base64
  • Embedding values in configs, headers, or URIs
  • Moving text through ASCII-only channels
  • A quick transform you can reverse exactly

Not the best choice for

  • Hiding or securing secrets (it is not encryption)
  • URL parameters without swapping + / for - _
  • Encoding image or binary files (use a file tool)
  • Shrinking data (Base64 grows it ~33%)

For an image or file, use Image to Base64 (it builds a data URI); for a URL, swap to the URL-safe characters; to protect a secret, use real encryption.

Frequently asked questions

Does it handle emoji and non-English text?
Yes. It encodes your text as UTF-8 first, so emoji, accented letters and non-Latin scripts all encode correctly. Basic Base64 tools that skip this step fail on anything outside plain ASCII.
Is Base64 a form of encryption?
No. It is an encoding, fully reversible by anyone with a decoder. It hides nothing. Use real encryption for passwords or sensitive data.
Why is the encoded text longer than my input?
Base64 represents every three bytes as four characters, so the output is about 33% larger.
Can I put the output straight into a URL?
Not always safely. Standard Base64 uses + and /, which are special in URLs. For a URL, replace + with - and / with _ (the URL-safe variant), and you can usually drop the = padding.
What alphabet does it use?
Standard Base64 from RFC 4648: the letters A-Z and a-z, the digits 0-9, plus + and /, with = as padding at the end.
Can I encode an image or file here?
This tool is for text. To encode an image into a Base64 data URI, use the Image to Base64 tool, which reads the file's bytes directly.
Is my text uploaded?
No. Encoding happens entirely in your browser. Nothing is sent to a server, and clearing the box removes it.
How do I get my text back?
Paste it into a decoder that reads UTF-8, such as our Base64 Decoder, and you get the exact original text.
Does it add line breaks?
No. It produces a single continuous Base64 string with no inserted newlines, so it is ready to paste as one value.
Is there a length limit?
No fixed limit. It encodes in your browser, so very large text depends on your device, but ordinary strings encode instantly.

References

Checked against the encoder's code: UTF-8 first, then standard RFC 4648 Base64. The page says plainly that Base64 is for transport and protects nothing.

PopularHot

JSON Formatter

Paste messy or minified JSON and get it back pretty-printed with 2-space indentation. The same step tells you whether the JSON is valid.

DeveloperOpen Tool

Base64 Decoder

Decode Base64 back to readable text in your browser, Unicode included, and get a plain error message when the input is broken.

DeveloperOpen Tool

URL Encoder

Percent-encode a value so it can sit safely inside a URL. Spaces, ampersands, slashes and other special characters become %-codes, using the browser's encodeURIComponent.

DeveloperOpen Tool
Popular

Hash Generator

Get the MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text at once, updated as you type, with a plain note on which ones are still safe for security work.

DeveloperOpen Tool
Popular

UUID Generator

Generate up to 500 random version 4 UUIDs at once, the 128-bit identifiers used for database keys, from your browser's secure random generator.

DeveloperOpen Tool

URL Decoder

Turn percent-encoded text back into readable characters: %20 becomes a space and %26 an ampersand. It uses the browser's decodeURIComponent.

DeveloperOpen Tool

Back to the Base64 Encoder

Paste or pick your input at the top of the page. The conversion runs on this device and needs no account.