Choose text or file
Type or paste text, or choose a file to turn into Base64. Nothing is uploaded.
Developer Tools
Encode text or files to Base64 and decode Base64 back, entirely in your browser.
Encode text or a file into Base64, or decode Base64 back into text or a downloadable file, entirely on your device. Working with percent-encoded URLs instead? Try the URL Encoder / Decoder.
How it works
Type or paste text, or choose a file to turn into Base64. Nothing is uploaded.
Pick Encode or Decode, and optionally URL-safe output, padding or line wrapping.
Copy the result, or download decoded data as a file with the name you choose.
Use cases
Turn an icon into a data URI you can paste straight into CSS or HTML.
Decode a Base64 string from an API response, config file or email header to read it.
Produce Base64URL output without + / or padding characters for use in links and tokens.
FAQ
No. Encoding and decoding run entirely in your browser; nothing is sent to a server.
No. Base64 is only a way to write binary data as text. Anyone can decode it, so it does not protect secrets.
Yes. Text is encoded as UTF-8 before it is converted to Base64, and decoded back as UTF-8. If decoded bytes are not valid UTF-8 text, you will see a message and can download them as a file instead.
The URL-safe variant (Base64URL) uses - and _ instead of + and /, so the result can be used in URLs and filenames. When decoding, either alphabet is accepted, with or without padding.
File encoding is limited to 25 MB, because Base64 text is about a third larger than the original and must fit in your browser's memory.
Related Tools