Free Online Base64 Encoder / Decoder
Encode & decode Base64 and URL strings
Try these next
About this tool
Encode and decode Base64 and URL-encoded strings instantly. This free online tool handles both Base64 encoding (for embedding binary data in text formats like JSON, HTML, or email) and URL encoding (for safely passing special characters in query strings and API parameters). Paste your plain text and get the encoded version in one click, or paste an encoded string to decode it back to readable text. The tool supports full Unicode — emojis, CJK characters, and accented letters encode and decode correctly. A swap button lets you chain operations: encode, then decode the result to verify round-trip accuracy. Includes a dedicated URL encoding mode that uses encodeURIComponent for query parameter values, the most common use case when building API requests or form submissions. All processing runs entirely in your browser — no data is sent to any server. Whether you are debugging an API response, embedding an image as a data URI, or decoding a URL from a log file, this tool gives you the answer instantly.
Frequently Asked Questions
Base64 converts binary data into a text string using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It's used to embed images in HTML/CSS (data URIs), send binary attachments in email (MIME), and pass binary data through text-only channels like JSON or XML. The encoded output is about 33% larger than the original.
URL encoding (percent-encoding) replaces unsafe characters in URLs with a % followed by their hex code. For example, a space becomes %20 and an ampersand becomes %26. This is required for query string values, form data, and any text embedded in a URL to prevent breaking the URL structure.
Use encodeURIComponent for query parameter values — it encodes everything except letters, digits, and - _ . ~. Use encodeURI for full URLs — it preserves URL-structural characters like :, /, ?, and #. In practice, encodeURIComponent is what you want 95% of the time when building API requests.
The browser's native btoa() function only handles Latin-1 characters. This tool uses a Unicode-safe approach (TextEncoder + btoa) that correctly handles emojis, CJK characters, accented letters, and any other Unicode text. The result decodes back to the original text perfectly.
No. Base64 is an encoding, not encryption. Anyone can decode a Base64 string — it provides no security whatsoever. It's purely a format conversion for transporting binary data as text. Never use Base64 to 'protect' sensitive data like passwords or API keys.
Related Tools
Discover more free utilities to enhance your productivity.