How to encode or decode Base64
- Paste plain text or a Base64 string into the Input box.
- Click Encode to turn text into Base64, or Decode to turn Base64 back into text.
- Copy the output with the copy button.
What is Base64?
Base64 is a way to represent any data using only 64 safe characters: A to Z, a to z, 0 to 9, + and /. Every 3 bytes of input become 4 characters of output, so encoded data is about 33% larger than the original.
It exists so binary data and special characters can travel through systems that only handle plain text, such as email, URLs, JSON and HTTP headers.
Text is encoded as UTF-8 first, so accents, non-Latin scripts and emoji round-trip correctly.
Hello, world! -> SGVsbG8sIHdvcmxkIQ==
user:pass -> dXNlcjpwYXNz
¡Hola, señor! 👋 -> wqFIb2xhLCBzZcOxb3IhIPCfkYs=Where Base64 is used
- HTTP Basic authentication: the Authorization header carries "username:password" in Base64.
- Data URIs: small images and fonts embedded directly in HTML or CSS.
- Email attachments: MIME encodes files as Base64.
- APIs and JSON: binary files, certificates and keys are often sent as Base64 strings.
- JSON Web Tokens: each part of a JWT uses base64url, a URL-safe variant.
Frequently asked questions
- Is Base64 encryption?
- No. Base64 is an encoding that anyone can reverse without a key. Never use it to hide passwords or sensitive data; use real encryption for that.
- Why does Base64 output end with = or ==?
- The equals signs are padding. Base64 works on groups of 3 bytes, and when the input length is not a multiple of 3, one or two = characters fill the last group.
- Does it support accents and emoji?
- Yes. Text is converted to UTF-8 bytes before encoding and decoded back as UTF-8, so any language and emoji are preserved.
- Can I decode URL-safe Base64 or JWT parts?
- URL-safe Base64 (base64url) uses - and _ instead of + and /, which standard decoding rejects. Replace - with + and _ with /, or use the JWT Decoder to read tokens directly.
- Why does decoded output look like random symbols?
- The Base64 string probably contains binary data, such as an image or a compressed file, rather than text. This tool shows the decoded bytes as text, so binary content will not be readable.
- Is my data sent to a server?
- No. Encoding and decoding run in your browser, so credentials and private data never leave your device.