Base64 Encoder / Decoder
Type or paste text on the left to get Base64, or paste Base64 on the right to get the text back. Converted instantly in your browser, nothing is sent to a server.
Base64 Encoder and Decoder Online: Encode and Decode Base64 Instantly
Type or paste text on the left to get its Base64 representation on the right, or paste a Base64 string on the right to get the original text back. The conversion happens instantly in your browser, so your data is never sent to a server. UTF-8 text (Cyrillic, accented letters, emoji) and URL-safe Base64 are supported.
What is Base64?
Base64 is a way to write any data, including binary data, using only 64 safe characters: the letters A-Z and a-z, the digits 0-9, plus "+" and "/", with "=" used as padding at the end. Every 3 bytes of data become 4 characters, so the Base64 version is about 33% larger than the original. It exists because many systems, such as email, JSON, HTML and URLs, were built for text and can break or corrupt raw binary data.
Base64 is not encryption
Base64 only changes the format of the data, it does not protect it. Anyone can decode a Base64 string in a second, with this tool or with a single line of code, so never use it to hide passwords, API keys or personal data. For the same reason it does not hide links or text from search engines: this old trick no longer works, because search engines and browsers can decode it, and it may be treated as an attempt to manipulate search results.
Where Base64 is used today
- Images and fonts inside HTML and CSS as data: URIs, which saves a request for small files (use the Image to Base64 tool for pictures)
- Email attachments: MIME encodes attached files as Base64
- APIs and JSON: sending files, images or other binary data inside a text field
- HTTP Basic authentication: the Authorization header carries "username:password" in Base64 (it is encoded, not secured, so always use HTTPS)
- JWT tokens: each part of a JSON Web Token is Base64URL text that you can decode to read its contents
- Keys and certificates: PEM files (SSL certificates, SSH and PGP keys) are Base64 between the BEGIN and END lines
- Configuration and secrets: Kubernetes secrets and many CI/CD tools store values in Base64
- URLs and cookies: URL-safe Base64 carries small tokens in links, cookies and webhooks
URL-safe Base64 (Base64URL)
Standard Base64 contains "+", "/" and "=", which have a special meaning in URLs. The URL-safe variant replaces them with "-" and "_" and drops the padding. Turn on the "URL-safe Base64" switch to encode this way. When you decode, both alphabets are accepted automatically, with or without padding, and line breaks are ignored.
How to use the Base64 converter
- To encode, type or paste text in the Text box. The Base64 box fills in automatically.
- To decode, paste a Base64 string in the Base64 box. The original text appears in the Text box.
- Use the copy buttons to copy either result.
If the decoded data is not text (for example a picture), the tool tells you. Use the Base64 to Image tool to see it.
Similar tools
Decode Base64 input to an image.
Transform an image input to a Base64 string.
Encode any string input to URL format.
Convert text to hexadecimal and the other way for any string input.
Popular tools
Get the web-host of a given website.
Get approximate IP details.
Find A, AAAA, CNAME, MX, NS, TXT, SOA DNS records of a host.
Check if the URL is cached or not by Google.