Base64 Encoder / Decoder
Convert plain text to Base64 and decode Base64 strings to readable UTF-8 text with instant one-click copy and error detection.
Base64 encodes arbitrary bytes using 64 printable ASCII characters, which lets binary data survive channels that only accept text — email bodies, JSON fields, data URIs, HTTP headers. It is an encoding, not encryption: anyone can decode it instantly, and it offers no confidentiality whatsoever. This converter runs both directions in your browser, so credentials and tokens you decode for debugging never touch a server.
How to encode and decode Base64
- Choose a direction — Encode turns plain text into Base64, Decode turns Base64 back into text.
- Paste your input. Leading and trailing whitespace is ignored.
- Read the result and copy it. Conversion happens as you type.
- If decoding fails, check for missing '=' padding at the end or for URL-safe characters ('-' and '_') that need converting back to '+' and '/'.
The Base64 Encoder / Decoder runs entirely in your browser — nothing you enter is uploaded, stored, or logged.
When to use this tool
Inspecting Basic Auth headers
An 'Authorization: Basic' header is just base64 of 'username:password'. Decoding it while debugging shows immediately whether the client is sending the credentials you expect.
Building data URIs
Small images and fonts can be embedded directly in CSS or HTML as base64 data URIs, removing a network round trip at the cost of about 33% more bytes.
Moving binary through JSON
JSON has no binary type, so file contents are conventionally base64-encoded into a string field before transport and decoded on receipt.
Things worth knowing
- Base64 inflates data by roughly 33%. Three bytes of input become four characters of output.
- A string whose length is not a multiple of four is either truncated or missing its '=' padding.
- URL-safe Base64 (RFC 4648 §5) swaps '+' for '-' and '/' for '_' so the result survives being placed in a URL. JWTs use this variant.
- Never treat Base64 as a security measure — it is trivially reversible by design.
Frequently Asked Questions
What is Base64 used for?
Is Base64 encryption?
Why does my Base64 string end in one or two equals signs?
Why does decoding produce garbled characters?
Can I encode files as well as text?
Does Base64 handle emoji and non-English text?
Related Tools
JWT Decoder & Expiration Checker
Decode JSON Web Tokens (Header, Payload, Signature) and inspect expiration timestamps safely in your browser.
URL Encoder / Decoder
Encode query parameters and special characters into percent-encoded URL format, or decode URLs to plain text.
JSON Formatter & Validator
Format, validate, prettify, minify, and inspect JSON payloads with real-time error detection.