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 Converter 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 Image to Base64 Converter to see it.
Similar tools
Encode PNG, JPG, GIF, WebP and SVG to Base64 or a data:image URI for img src and CSS, and decode Base64 to an image. Free, in your browser, no upload.
URL decoder and encoder online: decode %20 and %XX codes to text, or encode text for a URL (value, whole URL, form data). UTF-8 and Windows-1251. In your browser.
Hex converter online: hexadecimal to decimal, binary and text and back, any size, plus float to hex (IEEE 754, 32 and 64 bit). Works in your browser.
Popular tools
Check who hosts a website: the IP address, the hosting company (ASN), the country and the city of the server. Free hosting checker for any domain.
Free IP lookup: find the country, city, coordinates and timezone of an IP address and its host name with a reverse IP (reverse DNS) lookup. IPv4 and IPv6.
Free DNS lookup online: check A, AAAA, CNAME, MX, NS, TXT, SOA and CAA records of any domain, plus its SSL certificate. Find out why a DNS lookup fails.
Check from the United States (New York) whether a website is online: HTTP status code and response time in milliseconds. A free US ping test for any URL.