Protego field desk

Base64 Encoder & Decoder

Encode and decode Base64 strings in real-time. Supports text input, file uploads, and URL-safe encoding. 100% client-side: your data never leaves your browser.

Quick answer

Base64 encodes binary data as text using 64 characters (A-Z, a-z, 0-9, + and /) plus = padding, as defined in RFC 4648. Every 3 bytes become 4 characters, so the output is about 33% larger. It is an encoding, not encryption: anyone can decode it. URL-safe Base64url swaps + and / for - and _.

0 chars
0 chars

What is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that converts binary data into a sequence of 64 printable ASCII characters. It was originally designed to safely transmit binary data over text-based protocols like SMTP (email) and HTTP.

The encoding uses the characters A-Z, a-z, 0-9, + and / (with = for padding). Every 3 bytes of input data are converted into 4 Base64 characters, resulting in a ~33% size increase.

Common Base64 Use Cases

Base64 encoding is used throughout web development and system administration for safe data transmission.

Data URIs

Embed small images directly in HTML and CSS using data:image/png;base64,... format, eliminating extra HTTP requests.

API Authentication

HTTP Basic Auth encodes username:password in Base64 for the Authorization header.

Email Attachments

MIME encoding uses Base64 to safely transmit binary files through email (SMTP) protocols.

JWT Tokens

JSON Web Tokens encode the header and payload as Base64url strings for safe URL transmission.

Developer Tools & API Platforms (2026)

Building APIs that use Base64? These platforms make API development, testing, and monitoring easier.

ToolTypePriceKey FeaturesLink
Postman
Recommended
API PlatformFree plan, paid plansAPI testing, Base64 encoding, team collaborationVisit
Insomnia
Open source
REST ClientFree plan, paid plansREST/GraphQL client, env variables, pluginsVisit
Hoppscotch
Browser-based
API ClientFreeOpen source, real-time, WebSocket supportVisit
RapidAPI
API Marketplace
Hub + TestingFree plan, paid plansAPI marketplace, testing, monitoring, analyticsVisit

Frequently Asked Questions

What is Base64 encoding?
Base64 is a binary-to-text encoding defined in RFC 4648. It splits data into 6-bit groups and maps each to one of 64 printable characters (A-Z, a-z, 0-9, + and /), adding = padding at the end when needed. That makes binary data safe to carry in email (MIME), JSON, XML and HTTP headers.
Is Base64 the same as encryption?
No. Base64 has no key, so anyone can decode it in a second, including with this tool. Never use it to hide passwords, API keys or personal data. HTTP Basic authentication only Base64-encodes the username and password, which is why it must always run over HTTPS.
What is URL-safe Base64 (Base64url)?
Base64url, described in section 5 of RFC 4648, replaces + with - and / with _ so the output can sit in URLs and file names without percent-encoding. It usually drops the = padding too. JSON Web Tokens use Base64url for their header and payload; tick URL-safe mode above to encode or decode it.
How much larger is Base64 than the original data?
About 33%. Every 3 bytes of input become 4 output characters, so a 300 KB image becomes roughly 400 KB of text. That overhead is why Base64 data URIs suit small icons, while larger files are better served as normal downloads.
Is my data sent to a server when I use this tool?
No. Encoding and decoding run in your browser with the built-in btoa() and atob() functions, with an extra step that keeps UTF-8 text such as accented letters and emoji intact. You can confirm it in your browser's Network tab: no request is made when you convert text.

Related Developer Tools

Base64url is the encoding inside every JSON Web Token: paste one into the JWT decoder or read the JWT complete guide to see how the header, payload and signature fit together.