Base64 Encoder & Decoder
Encode and decode Base64 strings online. Convert text to Base64 and back instantly in your browser — free, fast and private.
What is Base64?
Base64 is an encoding scheme that represents binary data using only 64 printable ASCII characters: A–Z, a–z, 0–9, plus + and /, with = as padding. It was designed so that arbitrary bytes can travel safely through systems that were built for plain text — email bodies, URLs, JSON payloads, HTTP headers, and so on. When you need to embed an image, a certificate, or any other binary blob inside a text-only context, Base64 encoding is the standard way to do it.
Why use this tool?
This Base64 encoder and decoder runs entirely in your browser. Whatever you paste — an API key, a token, an internal payload, a proprietary snippet — never leaves your machine. There is no server round-trip, no upload, no log. It is also fast: encoding or decoding a multi-megabyte string completes instantly with no network latency.
- Convert text to Base64 for use in JSON, URLs, headers, or email
- Decode a Base64 string back into the original UTF-8 text
- Inspect Base64-encoded payloads from APIs and tokens
- Copy the result to your clipboard with one click
How to encode and decode Base64 online
- Paste your text or Base64 string into the Input box on the left.
- Click Encode → Base64 to convert plain text into a Base64 string, or Decode → Text to convert a Base64 string back into UTF-8 text.
- The result appears on the right. Click Copy to put it on your clipboard, or Swap to move the output back into the input box for round-tripping.
- If decoding fails, you'll see an inline error explaining what went wrong — usually invalid characters or incorrect padding.
Example
Text to Base64
Input: Hello, world! Output: SGVsbG8sIHdvcmxkIQ==
Base64 to text
Input: RGVmdGtpdA== Output: Deftkit
Frequently asked questions
Is my data sent anywhere?
No. Encoding and decoding both happen entirely in your browser using the standard btoa / atob APIs combined with TextEncoder and TextDecoder for proper UTF-8 handling. No network request is made with your input.
Does it support Unicode and emoji?
Yes. The browser's built-in btoa only handles Latin-1, so this tool first converts text to UTF-8 bytes via TextEncoder before encoding. That means Chinese, Arabic, Cyrillic, emoji, and any other Unicode characters round-trip correctly.
Why does decoding say my Base64 is invalid?
Common causes: stray whitespace inside the string (this tool strips it), characters outside the Base64 alphabet, incorrect padding (the length should be a multiple of four, padded with =), or a mix of standard and URL-safe Base64. URL-safe Base64 uses - and _ in place of + and /; convert it back before decoding here.
What is Base64 used for in the real world?
Base64 shows up in data URIs (data:image/png;base64,…), JWT token headers and payloads, Basic HTTP auth headers, MIME email attachments, embedded SSH and TLS keys, and many database export formats. Anywhere binary needs to live inside a text-only channel, Base64 is usually the answer.
Is Base64 a form of encryption?
No. Base64 is encoding, not encryption. Anyone can decode a Base64 string with a single line of code — there is no key and no secret. Do not use Base64 to hide passwords, tokens, or any sensitive data. If you need confidentiality, use real cryptography.
How much does Base64 grow the data?
Base64 expands the input by roughly 33%: every three bytes become four ASCII characters. A one-megabyte file becomes about 1.37 megabytes when encoded. That overhead is the price of safe transport through text-only systems.
Related tools
- URL EncoderFree online URL encoder and decoder. Percent-encode and decode strings for query parameters, paths and fragments.
- JSON FormatterFree online JSON formatter, validator and beautifier. Paste JSON to format, minify, validate and copy — fast, private, runs in your browser.
- Image to Base64Convert images to Base64 data URLs for inline embedding in HTML, CSS, or Markdown. Drag-and-drop, instant preview, 100% client-side.