MagicTools
Back

Base64 Encode/Decode

Mode:

Input

Output

How to use / Why use this tool / FAQ

How to use

Select the Encode tab to convert plain text to Base64, or Decode to convert a Base64 string back to readable text. Type or paste your input — the result appears instantly without clicking any button. Click Copy to copy to clipboard, or Download to save the result as a text file. Full UTF-8 support means Chinese, Japanese, emoji, and other Unicode characters are handled correctly at all times. You can also switch between standard Base64 and URL-safe Base64 (which replaces + and / with - and _) depending on where you plan to use the encoded string.

Why use this tool

Base64 encoding is used throughout web development and data transmission: embedding binary data in JSON APIs, encoding credentials for HTTP Basic Auth headers, creating data URIs for images to embed directly in HTML or CSS, and passing data through systems that only support plain text. This tool encodes and decodes instantly in your browser without any server round-trip, making it safe to use with sensitive or confidential data. Unlike online tools that process your data on their servers, everything here runs locally. Common real-world uses include debugging JWT tokens, working with email MIME attachments, and embedding small images in config files.

FAQ

What is Base64 encoding?
Base64 converts binary data into a text-safe string using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It is used to transmit binary data over systems designed to handle text, such as email (MIME), JSON, and URLs.
Does it support Unicode and Chinese characters?
Yes. The tool uses UTF-8 encoding before Base64 conversion, so all Unicode characters including Chinese, Japanese, Korean, Arabic, and emoji are handled correctly.
Is Base64 the same as encryption?
No. Base64 is encoding, not encryption. It is fully reversible without a key — anyone can decode a Base64 string. Do not use it to protect sensitive data. Use encryption (AES, RSA) for security.
What is Base64 used for in web development?
Common uses: HTTP Basic Auth headers (Authorization: Basic base64(user:pass)), embedding images as data URIs in HTML/CSS, storing binary data in JSON, and encoding binary content for email attachments.
Is my data sent to a server when I encode/decode?
No. All Base64 encoding and decoding runs locally in your browser. Your data is never transmitted to any server.
What is the difference between Base64 and Base64 URL-safe?
Standard Base64 uses + and / characters which have special meaning in URLs. URL-safe Base64 replaces + with - and / with _, making it safe for use in URLs and filenames without percent-encoding.