Base64 Encoder & Decoder
Convert text to Base64 and back with full UTF-8 support, switch to URL-safe Base64, or turn any file into a Base64 string or data URI.
Free No sign-up Updated
Encode a file
Convert an image or any file (up to 10 MB) to Base64 or a data URI.
·
How to use Base64 Encoder & Decoder
- 1 Choose Encode to convert text to Base64, or Decode to turn Base64 back into readable text.
- 2 Paste your text or Base64 string. The result appears instantly as you type.
-
3
Enable URL-safe to use
-and_instead of+and/(used in JWTs and URLs). - 4 To encode an image or any file, use Encode a file below and copy the Base64 string or the complete data URI.
What is Base64 used for?
- Embedding small images in HTML or CSS as data URIs.
- Sending binary attachments in email (MIME).
- Storing binary data in JSON, XML or environment variables.
- HTTP Basic authentication headers and JSON Web Tokens.
Base64 is not encryption
Base64 only changes how data is represented — anyone can decode it instantly. Never use it to hide passwords or secrets. To create strong secrets, use the Password Generator; to inspect tokens that use Base64URL, use the JWT Decoder.
Frequently asked questions
What is Base64?
Base64 is an encoding that represents binary data using 64 printable ASCII characters. It is used to embed images in HTML and CSS, send attachments in email, and transport data in JSON or URLs. It is an encoding, not encryption — anyone can decode it.
Does this tool support emoji and accented characters?
Yes. Text is converted to UTF-8 before encoding, so emoji, accents and non-Latin scripts encode and decode correctly.
What is URL-safe Base64?
URL-safe Base64 (Base64URL) replaces + with - and / with _ and removes the = padding, so the result can be used in URLs and file names. The decoder accepts both variants automatically.
Why does Base64 make data bigger?
Every 3 bytes of input become 4 Base64 characters, so encoded data is about 33% larger than the original.
Is my data uploaded?
No. Encoding and decoding happen in your browser. Your text and files never leave your device.
Related tools
JSON Formatter
Format, validate and minify JSON directly in your browser.
Hash Generator
Generate MD5, SHA-1, SHA-256 and SHA-512 hashes of text or files.
Unix Timestamp Converter
Convert Unix timestamps to dates and dates to timestamps.
Color Converter & Contrast Checker
Convert HEX, RGB and HSL colors and check WCAG contrast.