Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 strings back to readable text. Standard and URL-safe variants. Free, instant, and private.
Base64 is a binary-to-text encoding scheme that represents binary data using a set of 64 printable ASCII characters. It converts every three bytes of input into four characters from its alphabet (A-Z, a-z, 0-9, +, /), with = used as padding when the input length is not divisible by three. This encoding is fundamental to modern web development, email systems, and data interchange formats. Our Base64 Encoder and Decoder converts text to Base64 and back instantly in your browser.
Base64 encoding is everywhere in web development. Email attachments use it via MIME to transmit binary files through text-based protocols. Data URIs embed images, fonts, and other resources directly in HTML and CSS using Base64-encoded strings. REST APIs frequently use Base64 for transmitting binary payloads in JSON, which only supports text. JSON Web Tokens (JWT) encode their header and payload sections in Base64url format. HTTP Basic Authentication encodes username:password pairs in Base64. Configuration files, environment variables, and deployment scripts use it to safely store binary credentials and certificates as text strings.
The tool offers both standard Base64 and URL-safe Base64 variants. Standard Base64 uses + and / as its 62nd and 63rd characters, which conflict with URL syntax (+ means space, / is a path separator). URL-safe Base64 (defined in RFC 4648) replaces these with - and _ respectively, making the output safe for use in URLs, query parameters, filenames, and cookies without additional percent-encoding. Both variants are fully interchangeable โ the only difference is the two substituted characters.
All encoding and decoding runs entirely in your browser using JavaScript's built-in btoa/atob functions with proper UTF-8 handling. No data is transmitted to any server, making this tool safe for encoding sensitive content like API keys, tokens, passwords, and private certificates. The tool correctly handles multi-byte UTF-8 characters, so text in any language or script encodes and decodes properly.
How to Use
Choose Direction & Variant
Select standard or URL-safe encoding, or choose decode to convert Base64 back to text
Enter Your Input
Type or paste plain text to encode, or paste a Base64 string to decode
Copy the Result
The converted output appears instantly โ click copy to use it in your project
Base64 FAQ
Base64 is a method of encoding binary data as printable ASCII text. It uses 64 characters (A-Z, a-z, 0-9, +, /) to represent data, with = for padding. Every 3 bytes of input become 4 Base64 characters, making the output about 33% larger than the input.
Base64 allows binary data to be transmitted through text-only channels. Common uses include email attachments (MIME), embedding images in HTML/CSS (data URIs), JSON API payloads, JWT tokens, HTTP Basic Auth, and storing binary data in text-based configuration files.
No. Base64 is encoding, not encryption. It provides no security whatsoever โ anyone can decode a Base64 string instantly. It is designed for data format conversion, not confidentiality. Never use Base64 alone to protect sensitive information.
Standard Base64 uses + and / characters, which have special meaning in URLs. URL-safe Base64 (RFC 4648) replaces + with - and / with _, making the output safe for use in URLs, cookies, and filenames without additional escaping.
The = character is used for padding. Base64 processes input in groups of 3 bytes. If the input length is not divisible by 3, padding characters are added to make the output a multiple of 4 characters. One remaining byte produces ==, two remaining bytes produce =.
Yes. The tool handles UTF-8 encoding correctly, so text in any language or script โ including Chinese, Arabic, emoji, and accented characters โ encodes and decodes properly. The text is first converted to UTF-8 bytes, then those bytes are Base64 encoded.
Base64 increases data size by approximately 33%. Every 3 bytes of input become 4 Base64 characters (each representing 6 bits instead of 8). This overhead is the tradeoff for being able to represent binary data as safe ASCII text.
No. All encoding and decoding happens in your browser using JavaScript. No data is transmitted anywhere. This makes the tool safe for use with sensitive content like API keys, tokens, passwords, and certificates.