An instant Base64 decode and encode tool. Encode text to Base64 or decode Base64 strings instantly. Side-by-side encoding and decoding with copy functionality.
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It's commonly used to encode data that needs to be stored or transferred over media that are designed to deal with textual data.
Key Characteristics:
• Uses 64 characters: A-Z, a-z, 0-9, +, and /
• Padding uses = character when needed
• Increases data size by approximately 33%
• Commonly used in email attachments, data URIs, and API responses
Base64 encoding is essential when you need to embed binary data (like images, files, or encrypted data) into text-based formats such as JSON, XML, or HTML. It ensures that the data can be safely transmitted without corruption.
Base64 encoding and decoding can be done using various methods depending on your programming language or tool. Here are the most common approaches:
Use the built-in btoa() and atob() functions:
// Encoding
const text = "Hello World";
const encoded = btoa(text);
console.log(encoded); // "SGVsbG8gV29ybGQ="
// Decoding
const decoded = atob(encoded);
console.log(decoded); // "Hello World"Use the base64 module:
import base64
# Encoding
text = "Hello World"
encoded = base64.b64encode(text.encode()).decode()
print(encoded) # "SGVsbG8gV29ybGQ="
# Decoding
decoded = base64.b64decode(encoded).decode()
print(decoded) # "Hello World"Use command-line tools:
# Linux/Mac - Encoding
echo -n "Hello World" | base64
# Linux/Mac - Decoding
echo "SGVsbG8gV29ybGQ=" | base64 -d
# Windows PowerShell - Encoding
[Convert]::ToBase64String(
[Text.Encoding]::UTF8.GetBytes("Hello World")
)
# Windows PowerShell - Decoding
[Text.Encoding]::UTF8.GetString(
[Convert]::FromBase64String("SGVsbG8gV29ybGQ=")
)Our Base64 encoder and decoder tool makes it incredibly easy to encode and decode Base64 strings. Follow these simple steps:
Select the Encode tab to convert text to Base64, or the Decode tab to convert Base64 back to text. The tool automatically initializes with example values to help you get started.
For encoding, paste or type your text in the input field. For decoding, paste your Base64 string. The conversion happens automatically as you type, with results displayed in real-time on the right side.
Click the Copy button next to the output field to copy the encoded or decoded result to your clipboard. You can also use the main Encode or Decode button at the bottom to manually trigger the conversion.
Paste the copied Base64 string into your code, API request, data URI, or wherever you need it. The tool handles all encoding/decoding automatically, so you don't need to worry about the technical details.
Discover more free tools to boost your productivity
Box
Create beautiful box shadow with our free box shadow css generator. Generate custom box shadow css with 60+ preset effects, live preview & instant Tailwind and CSS box shadow code.
Gradient
Create beautiful gradient background using tailwind CSS Gradient Generator. Use 90+ presets to generate customized tailwind, CSS gradient background code quickly with live preview.
HEX: #ff5733
RGB: 255, 87, 51
HEX: #4a90e2
RGB: 74, 144, 226
Convert HEX color codes to RGB values instantly with our free HEX to RGB converter. Learn how HEX to RGB conversion works, understand color formats, and get accurate RGB values for web development.
Blog Post
Transform your content...
Social Post
Transform any blog post into engaging, platform-optimized content using our Blog to Social Media Post Generator. Powered by AI to maintain your message while adapting tone and style.
Subscribe to FrontendGeek Hub for frontend interview preparation, interview experiences, curated resources and roadmaps.
All in One Preparation Hub to Ace Frontend Interviews. Master JavaScript, React, System Design, and more with curated resources.
© 2026 FrontendGeek. All rights reserved