Loading Zilita...
Loading Zilita...
We value your privacy
Zilita uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic. You can choose to accept or decline. No personal data is stored on our servers.
Encode and decode Base64 strings
The Base64 Encoder/Decoder converts text and binary data to and from Base64 encoding. Base64 is a standard encoding scheme used in email attachments, data URLs, API authentication headers, and embedded resources. This tool performs the conversion instantly with no server processing. Base64 encoding is a foundational technology in modern web development that most developers encounter regularly but rarely think about. It appears in email attachments as the mechanism that allows binary files to pass through text-only SMTP protocols. It enables data URIs that embed images, fonts, and other assets directly inside HTML and CSS files, eliminating extra HTTP requests. It is the encoding used for HTTP Basic Authentication headers, representing username:password pairs as portable ASCII strings. It shows up in API responses, configuration files, and JWT tokens. The Base64 Encoder/Decoder handles all of these cases in a single interface. Type or paste text to encode it to Base64, or paste a Base64 string to decode it back to the original content. A single toggle switches between encoding and decoding modes, and the output updates instantly as you type.
Paste raw text to receive its Base64-encoded equivalent, or paste a Base64 string to decode it back to the original text. The tool handles both directions in a single interface with a toggle switch. It also supports URL-safe Base64 encoding, which replaces the `+` and `/` characters with `-` and `_` for use in web URLs. In encode mode, the tool takes any text input — plain ASCII, international Unicode characters, or emoji — and converts it to its Base64 representation. The output is a string of A-Z, a-z, 0-9, +, and / characters, optionally padded with = signs to ensure the output length is a multiple of four. The character count and byte size of both input and output are displayed for reference. In decode mode, the tool takes a Base64-encoded string and converts it back to the original text. It automatically detects and handles standard padding, and falls back gracefully if the padding is missing. The URL-safe mode toggle switches the character set to use - and _ instead of + and /, producing output that can be safely embedded in URLs without percent-encoding.
Base64 encoding comes up more often than most developers expect: embedding images in CSS, encoding credentials for HTTP Basic Auth, creating data URIs for inline assets, and transmitting binary data through text-only protocols. Having a quick conversion tool prevents mistakes from manual encoding and avoids the overhead of writing a script for a one-off conversion. The tool also eliminates encoding errors that commonly occur with manual conversion of special characters and handles UTF-8 content correctly, unlike many online converters that only support basic ASCII.
Encode images as data URIs for CSS embedding or decode Base64 strings found in API responses and configuration files.
Verify Base64-encoded authentication tokens and API credentials during debugging sessions.
Decode suspicious Base64 payloads found in log files or network traffic to determine their contents.
Understand how Base64 encoding works by comparing original and encoded text side by side.
A developer converts a small SVG logo to Base64 and pastes the encoded string into a CSS `background-image: url(data:image/svg+xml;base64,...)` rule, eliminating an extra HTTP request.
A security analyst finds a Base64 string in an HTTP Authorization header during a traffic inspection. Decoding it reveals the username:password format used for Basic authentication.
A developer working on a multilingual application needs to pass a Chinese city name through a URL parameter. Using URL-safe Base64, the developer encodes the characters and passes the result as the parameter value without any loss or corruption.
The Zilita Team builds privacy-first browser tools that help teachers, students, developers, businesses, and creators work more efficiently without sacrificing data privacy.