Skip to content
ForgePlug — Logo
Developer100% Browser-BasedNo Signup

Base64 Encoder & Decoder

A premium Base64 encoder/decoder that works entirely in your browser. Encode plain text to Base64 or decode Base64 back to text with full Unicode, emoji, and multiline support. Features live mode with auto-debounce, intelligent auto-detect, file upload support, character encoding selection, hex and binary previews, and detailed statistics — all without sending any data to a server.

Plain Text

Text to encode

Base64 Output

Encoded Base64

Encode·UTF-8
Auto

Keyboard Shortcuts

EncodeCtrl+Enter
DecodeCtrl+Shift+D
SwapCtrl+Shift+X
ClearCtrl+L

Examples

Pre-built examples to see Base64 encoding in action.

Simple Text

Basic text encoding example

short

Hello, World! Welcome to ForgePlug Base64 Encoder.

JSON

JSON object encoded as Base64

214 chars

{ "name": "ForgePlug", "version": "1.0.0", "tools": [ "Base64 Encoder"...

JWT Sample

JWT token structure (header.payload.signature) in Base64

119 chars

{ "alg": "HS256", "typ": "JWT" }. { "sub": "1234567890", "name": "John D...

Lorem Ipsum

Multi-line text paragraph

231 chars

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor i...

Unicode

Unicode characters and special symbols

110 chars

Unicode support: ñóüêç宆™€£¥§©°±×÷¿¡«»‽∞≈≠≤≥√∫∑∂∆∏∑—–•·…‰■□▪▫▲▼◆◇○●◐◑★☆☐☑☒✓✔✕✖✗...

Emoji

Emoji and emoticons

68 chars

🎉✨🚀🌟💡🎯🔥💪⚡🎨💻📱🌍🌈🍕🎸🎭🎪🎢🎡🎠🎪🎭🎨🎯🎯🔥💪⚡🎉✨🚀🌟💡🎯🔥

Frequently Asked Questions

What is Base64?
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It uses 64 different characters (A-Z, a-z, 0-9, +, /) plus the '=' padding character. Base64 is commonly used to transmit data over media that are designed to handle textual data, such as email attachments via MIME, storing complex data in JSON, or embedding images in HTML/CSS as data URLs.
Why is Base64 used?
Base64 is used when you need to encode binary data (like images, files, or encrypted data) into a format that can be safely transmitted over text-based protocols like HTTP, JSON, or email (SMTP). Common use cases include embedding images in HTML (data URIs), encoding authentication tokens (Basic Auth), JWT tokens, storing binary data in JSON APIs, and encoding email attachments (MIME).
Is Base64 encryption?
No. Base64 is NOT encryption — it is just encoding. Anyone can decode Base64 instantly using our tool or any Base64 decoder. Base64 does not use a key and provides no security whatsoever. Never use Base64 to protect sensitive data. If you need security, use proper encryption algorithms like AES or RSA. Base64 is only useful for data transmission, not data protection.
How do I decode Base64?
Simply paste your Base64 string into the input area and click 'Decode'. Our tool will automatically detect that the input is Base64 and decode it back to plain text. You can also enable 'Live Mode' for instant decoding as you type. If you want to go the other direction, type or paste plain text and click 'Encode' to convert it to Base64.
Is my data uploaded to a server?
Absolutely not. Everything happens entirely in your browser. The encoding and decoding is done using JavaScript's built-in btoa() and atob() functions combined with the TextEncoder and TextDecoder APIs. Your data never leaves your device — no network requests, no uploads, no server processing. This is a core privacy feature of all ForgePlug tools.
Does Base64 increase file size?
Yes. Base64 encoding increases the data size by approximately 33% (the encoding ratio is about 4:3). For every 3 bytes of input, Base64 produces 4 bytes of output. This overhead is the trade-off for being able to transmit binary data over text-only protocols. For large files, this is something to keep in mind.
Can I encode UTF-8 and Unicode?
Yes! Our tool fully supports UTF-8, Unicode, emoji, special characters, and multiline text. We use the Web's TextEncoder API to convert text to UTF-8 bytes before encoding to Base64, and TextDecoder to convert decoded bytes back to readable text. This ensures that every character, including emojis like 🎉 and special symbols like ñüé, is handled correctly.
Can I encode entire files?
You can upload .txt files up to 10MB in size. The file content is read as text and then encoded/decoded according to your selected mode. For binary files like images or PDFs, the file content will be read as text which may not produce meaningful results. For binary-to-Base64 conversion, a more advanced file reader would be needed.

Base64 Encoding: How It Works and When to Use It

A practical guide to the encoding format that powers email attachments, data URIs, and JSON APIs.

Base64 is one of those technologies that most developers encounter regularly but few deeply understand. It appears in email headers, API authentication, JWT tokens, data URIs, and countless other contexts. Knowing what Base64 actually does — and more importantly, what it does not do — is essential for using it correctly and avoiding common misconceptions.

What Base64 Encoding Does

Base64 is a binary-to-text encoding scheme that represents arbitrary binary data using a set of 64 printable ASCII characters: uppercase A–Z (0–25), lowercase a–z (26–51), digits 0–9 (52–61), plus the plus sign (+ for 62) and forward slash (/ for 63). An equals sign (=) is used as padding when the input length is not a multiple of three bytes.

The encoding process works in groups of three input bytes (24 bits), which are split into four 6-bit groups. Each 6-bit group maps to one of the 64 characters in the Base64 alphabet. This means every 3 bytes of binary data becomes 4 bytes of Base64 text — an overhead of approximately 33%.

The purpose of Base64 is not security or compression — it is compatibility. Many systems were designed to handle only ASCII text (email protocols, URL parameters, JSON values, HTML attributes), but needed to transmit binary data like images, encrypted content, or serialized objects. Base64 provides a safe way to embed binary data in text-only contexts without corruption from character encoding conversions, line-ending transformations, or other text processing.

Common Use Cases

Data URIs are one of the most visible uses of Base64. When you embed an image directly in an HTML file or CSS stylesheet using a data: URL, the image data is Base64-encoded and included inline. This eliminates a network request but increases the file size by about 33% — a worthwhile trade-off for small icons and decorative elements, but impractical for large images.

HTTP Basic Authentication sends credentials as Authorization: Basic base64(username:password). The server decodes the Base64 string to extract the credentials. While Base64 is not encryption, the Basic scheme is typically used over HTTPS, which provides the actual security through TLS encryption.

JWT (JSON Web Tokens) use Base64URL — a URL-safe variant that replaces + with -, / with _, and omits padding — to encode the header and payload segments. The signature is also Base64URL-encoded, producing the three-part token format that API developers work with daily.

Email attachments (MIME) encode binary files as Base64 text within email messages, allowing images, PDFs, and other binary content to be transmitted through text-based email protocols like SMTP.

Storing binary data in JSON is another practical use case. When an API needs to return binary data (like a generated file or image) as part of a JSON response, Base64 encoding allows the binary content to be included as a string value.

Base64 Is Not Encryption

This is the most important misconception to address: Base64 encoding provides absolutely no security. Anyone can decode a Base64 string instantly using any Base64 decoder, including this tool. Base64 does not use a key, does not involve a mathematical transformation designed for secrecy, and was never intended for security purposes.

Never store passwords, API keys, or sensitive data in Base64 thinking it provides protection. If you need to encrypt data, use established algorithms like AES-256, RSA, or ChaCha20. Base64 is purely an encoding format for data transmission compatibility.

Unicode and UTF-8 Considerations

When encoding text that contains Unicode characters (accented letters, Chinese characters, emoji), the text must first be converted to UTF-8 bytes before Base64 encoding. The standard btoa() function in JavaScript only works with Latin-1 characters, so encoding Unicode text requires using TextEncoder to produce UTF-8 bytes first. ForgePlug's Base64 tool handles this automatically, supporting the full range of Unicode characters including emoji.

Size Impact

Base64 increases data size by approximately 33%. For every 3 bytes of input, 4 bytes of output are produced. This overhead is the inherent cost of representing 8-bit binary data using only 6 bits per character. For large files, this can be significant — a 1MB image becomes approximately 1.33MB when Base64-encoded. When size matters, consider whether Base64 is the right choice or whether binary transfer would be more appropriate.

Frequently Asked Questions

Everything you need to know about encoding and decoding Base64

What is Base64?
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It uses 64 different characters (A-Z, a-z, 0-9, +, /) plus the '=' padding character. Base64 is commonly used to transmit data over media that are designed to handle textual data, such as email attachments via MIME, storing complex data in JSON, or embedding images in HTML/CSS as data URLs.
Why is Base64 used?
Base64 is used when you need to encode binary data (like images, files, or encrypted data) into a format that can be safely transmitted over text-based protocols like HTTP, JSON, or email (SMTP). Common use cases include embedding images in HTML (data URIs), encoding authentication tokens (Basic Auth), JWT tokens, storing binary data in JSON APIs, and encoding email attachments (MIME).
Is Base64 encryption?
No. Base64 is NOT encryption — it is just encoding. Anyone can decode Base64 instantly using our tool or any Base64 decoder. Base64 does not use a key and provides no security whatsoever. Never use Base64 to protect sensitive data. If you need security, use proper encryption algorithms like AES or RSA. Base64 is only useful for data transmission, not data protection.
How do I decode Base64?
Simply paste your Base64 string into the input area and click 'Decode'. Our tool will automatically detect that the input is Base64 and decode it back to plain text. You can also enable 'Live Mode' for instant decoding as you type. If you want to go the other direction, type or paste plain text and click 'Encode' to convert it to Base64.
Is my data uploaded to a server?
Absolutely not. Everything happens entirely in your browser. The encoding and decoding is done using JavaScript's built-in btoa() and atob() functions combined with the TextEncoder and TextDecoder APIs. Your data never leaves your device — no network requests, no uploads, no server processing. This is a core privacy feature of all ForgePlug tools.
Does Base64 increase file size?
Yes. Base64 encoding increases the data size by approximately 33% (the encoding ratio is about 4:3). For every 3 bytes of input, Base64 produces 4 bytes of output. This overhead is the trade-off for being able to transmit binary data over text-only protocols. For large files, this is something to keep in mind.
Can I encode UTF-8 and Unicode?
Yes! Our tool fully supports UTF-8, Unicode, emoji, special characters, and multiline text. We use the Web's TextEncoder API to convert text to UTF-8 bytes before encoding to Base64, and TextDecoder to convert decoded bytes back to readable text. This ensures that every character, including emojis like 🎉 and special symbols like ñüé, is handled correctly.
Can I encode entire files?
You can upload .txt files up to 10MB in size. The file content is read as text and then encoded/decoded according to your selected mode. For binary files like images or PDFs, the file content will be read as text which may not produce meaningful results. For binary-to-Base64 conversion, a more advanced file reader would be needed.

Guides & Articles

Learn how to get the most out of this tool with our in-depth guides.

Tool Overview

A closer look at Base64 Encoder & Decoder — how it works, who it's for, and where it fits in your workflow.

Base64 is an encoding scheme that represents binary data as a safe ASCII string using 64 characters (A-Z, a-z, 0-9, +, /, and = padding). It exists because many transport layers — email, JSON, URLs, HTTP headers — were designed for text and choke on raw bytes. When you see a long string ending in "==" in an API response, a data URL, or an email attachment, you're looking at Base64-encoded content.

The Encoder & Decoder converts between plain text and Base64 with full Unicode support, so emoji, accented characters, and multiline text survive the round-trip intact. Smart auto-detection recognizes whether your pasted content is already Base64 and switches direction automatically, while file support lets you encode any binary upload or decode its payload. Live mode updates the result as you type, with optional hex and binary previews for learning or debugging.

Encoding is not encryption — Base64 is trivially reversible, so never use it to protect secrets. Use it for data interchange, embedding small assets, and debugging protocols. Every transformation happens locally in your browser, so sensitive payloads like tokens or config values you paste are never transmitted anywhere.

A few everyday debugging jobs lean on Base64 without most people realizing it. A JWT's header and payload segments are Base64URL-encoded JSON — paste either segment in here to see the raw claims before they're signature-verified. An image can be inlined directly into HTML or CSS as a data URI by encoding the file, skipping a separate network request for small icons or logos. And an HTTP Basic Auth header is just "username:password" Base64-encoded after the word "Basic" — decoding one is often the fastest way to confirm what credentials a request is actually sending.

Key Features

Everything you get with this tool, at a glance.

Encode & Decode

Convert text to Base64 and back with instant, reversible results.

Smart Auto-Detect

Automatically determines whether your input is Base64 and picks the right direction.

File Support

Encode any local file or decode an uploaded payload without leaving the page.

Full Unicode & UTF-8

Emoji, accented characters, and multiline text encode and decode correctly.

Hex & Binary Previews

Inspect the underlying bytes to understand exactly what the encoding produces.

Live, Offline, Private

Auto-debounced live mode runs entirely in your browser with zero uploads.

How to Use Base64 Encoder & Decoder

Get from zero to done in four quick steps — no account, no learning curve.

  1. Paste or type your text

    Enter plain text to encode, or a Base64 string to decode. Auto-detect picks the direction.

  2. Use live mode

    Toggle live mode to see the result update automatically as you type or edit.

  3. Inspect previews

    Open the hex or binary preview to see exactly how your data is being represented.

  4. Copy or download

    Copy the result in one click, or download large payloads as a file.

Practical Examples

Real input and output pairs so you know exactly what to expect.

Encode plain text

Input

Hello, World!

Output

SGVsbG8sIFdvcmxkIQ==

Decode Base64

Input

SGVsbG8sIFdvcmxkIQ==

Output

Hello, World!

Unicode survives round-trip

Input

ForgePlug 🚀 ünïcode

Output

Rm9yZ2VQbHVnIPCfppAgw7xu77yRY29kZQ==

Guides & Articles

Learn how to get the most out of this tool with our in-depth guides.

Part of Developer Essentials

Was this tool helpful?

Your feedback helps us improve Base64 Encoder & Decoder for everyone.

Share this tool

Share
Runs in your browser100% privateNo data uploaded