A little help goes a long way. Find a tool/

Security

Base64 Encoder & Decoder

Free Base64 encoder and decoder. Convert text to Base64 or decode Base64 strings. Runs in your browser, no data sent anywhere.

YOUR WORKSPACEFree to use. No sign-up.
—
Enter text above.

Deep dive guides

A LITTLE CONTEXT · 4 MIN READHow Base64 Encoding Works

How base64 encoder & decoder works

Base64 is an encoding scheme that represents binary data using 64 printable ASCII characters (A-Z, a-z, 0-9, +, /). It is used to safely transmit data over channels that only accept text, like email attachments (MIME), data URIs in HTML, and JSON Web Tokens.

This tool encodes any text you enter into Base64 using the standard alphabet, or decodes an existing Base64 string back to text. Encoding increases the size by roughly 33% (every 3 bytes becomes 4 characters). The padding character (=) is added at the end when the input length is not a multiple of 3.

Base64 is an encoding, not encryption. It provides no security or confidentiality. Anyone can decode it. Use it for data transport, not for protecting secrets. Text is first converted to UTF-8 bytes and then encoded, so emoji and non-Latin scripts work; decoding strips whitespace and accepts the URL-safe alphabet (- and _). All processing happens in your browser.

Frequently asked questions

What is Base64 used for?
Base64 is used to encode binary data as text so it can be safely transmitted over text-only channels like email (MIME), embedded in HTML/CSS as data URIs, or included in JSON. It is also used in JWT tokens and basic HTTP authentication.
Is Base64 encryption?
No. Base64 is an encoding, not encryption. It provides no security. Anyone can decode a Base64 string. Do not use it to protect secrets; use it for data transport and storage format compatibility.
Why does Base64 make text longer?
Base64 encodes every 3 bytes of input as 4 characters of output, so the result is about 33% larger than the original. Padding (= characters) is added when the input length is not a multiple of 3.
Can I encode and decode UTF-8 text?
Yes. The tool first encodes your text to UTF-8 bytes and then Base64-encodes those bytes, so emoji, accents and non-Latin scripts all round-trip exactly (plain btoa would throw on anything above U+00FF). Decoding is the mirror image: whitespace and newlines are stripped, the URL-safe alphabet (- and _) is accepted, and the bytes are decoded as UTF-8 — if the decoded bytes are not valid UTF-8 text, the tool says so instead of returning mojibake.
What is the URL-safe variant?
JWTs and URLs use base64url: + becomes -, / becomes _, and the = padding is dropped so the string survives URLs and filenames. This encoder accepts that form when decoding, and its API exposes a urlSafe option that produces it.