About Base64 Encoder / Decoder
Base64 Encoder & Decoder converts text and files to Base64 and back. Use it to embed images directly in HTML or CSS, inspect tokens, or decode Base64 strings from APIs and emails into readable text or the original file.
What is Base64?
Base64 is a way to represent any binary data, such as images, PDFs or encrypted bytes, using only 64 safe text characters: A–Z, a–z, 0–9, + and /. Every 3 bytes of input become 4 characters of output. That makes data about 33% larger, but it can travel safely through systems built for text, like JSON, HTML, email and URLs.
Base64 isn't encryption. Anyone can decode it instantly, so never use it to hide passwords or secrets.
Common uses
- Data URLs: embed small images and icons in HTML (
<img src="data:image/png;base64,…">) or CSS to save a network request. - APIs: send files inside JSON payloads, or read Base64 fields from responses.
- Authentication: inspect HTTP Basic Auth headers and the parts of JWT tokens, which use URL-safe Base64.
- Email: attachments are Base64-encoded inside MIME messages.
Standard vs URL-safe
Standard Base64 uses + and /, which have special meanings in URLs. URL-safe Base64 replaces them with - and _ and usually drops the trailing = padding. Use it for tokens, URL parameters and file names.
Tips
- Only inline small images (a few KB) as data URLs. Large ones make your HTML or CSS heavy and can't be cached separately.
- If decoding shows garbled text, the data is probably a file. Switch to the File tab to download it.
- Text is encoded as UTF-8, so accented letters, non-Latin scripts and emoji survive the round trip intact.