About the Base64 Converter
Convert text to Base64 and back in real time. Paste a string to encode it for a header, config file, JSON payload or URL; paste a Base64 blob to decode it and read what's inside. Unicode is handled correctly — accents, CJK characters and emoji survive the round trip — and nothing leaves your browser.
What Base64 is
Base64 represents binary data using 64 printable ASCII characters: A–Z, a–z, 0–9, + and /, with = used as padding. Every 3 bytes of input become 4 characters of output, so encoded data is about 33% larger. It exists because many systems — email, JSON, XML, HTTP headers, URLs, environment variables — can only carry text safely. Base64 is an encoding, not encryption: anyone can decode it, and it offers no secrecy whatsoever.
Text is first converted to UTF-8 bytes and then Base64-encoded, which is why "é" becomes w6k= and "👍" becomes 8J+RjQ==. Decoding reverses both steps, so text in any language decodes correctly.
Where you'll meet Base64
- HTTP Basic Authentication headers (user:password encoded).
- JWT tokens — the header and payload are Base64URL-encoded JSON.
- Data URIs for inline images and fonts in HTML and CSS.
- Kubernetes Secrets, which store values Base64-encoded in YAML.
- Email attachments (MIME) and embedded images in HTML emails.
- API responses that carry binary files inside JSON.
- SAML assertions, X.509 certificates (PEM) and SSH public keys.
Base64 vs Base64URL
Standard Base64 uses + and /, which have special meaning in URLs and file names. Base64URL swaps them for - and _ and usually drops the = padding. JWTs, OAuth and many web APIs use Base64URL. If a decode fails on a token from a URL, replace - with + and _ with / (and add = padding to a multiple of four characters) before decoding — or use the JWT Parser, which handles it automatically.
How to use the Base64 Converter
- 1Choose a mode. Select Encode to convert text to Base64, or Decode to convert Base64 back to text.
- 2Paste the input. Type or paste into the input box. The result updates instantly.
- 3Copy the output. Click Copy to put the result on your clipboard.
Frequently asked questions
- Is Base64 secure? Can I use it to hide passwords?
- No. Base64 is reversible by anyone in a fraction of a second. Use real encryption (see the AES Encryption tool) for anything confidential.
- Why does decoding give garbled text or an error?
- The input may be Base64URL (contains - or _), may be missing padding, may include line breaks or spaces, or may not be text at all (an image or binary file). For files, use the Base64 Image to File converter.
- Why is the encoded output longer than my text?
- Base64 always expands data by roughly a third — 3 bytes in, 4 characters out — plus up to two = padding characters.
- Can I Base64-encode a file or image?
- Yes — use the Base64 File Converter, which produces both the raw Base64 and a data URI with the correct MIME type.