Skip to main content
92 Nodes
All resources
Free tool

Base64 Encoder & Decoder

Encode or decode text and files, privately in your browser.

Encode text and files to Base64 or decode Base64 back to its original form. Standard Base64 and URL-safe Base64 are supported, and everything is processed privately in your browser.

Loading Base64 tool…
Basics

What Base64 encoding actually does

Base64 turns arbitrary bytes — plain text, images, PDFs, anything — into a string built from just 64 printable characters. It exists because a lot of systems (JSON, XML, email, URLs) were designed to carry text safely, not raw binary. Instead of risking a byte sequence that breaks a parser or gets mangled in transit, Base64 re-packs the data into a format every one of those systems can pass through untouched.

It's reversible and has no key: encoding and decoding are the same operation in both directions, and anyone can run either one. That makes it a format for compatibility, not a format for secrecy.

Common confusion

Base64 vs. encryption

Because Base64 output looks scrambled, it's easy to mistake it for something secure — it isn't. Decoding it back to the original data takes no password, no key, and no special tooling; this very page does it instantly, for free, with nothing but a browser. If you paste a Base64-encoded password or API token into a public place, you've published the original value just as surely as if you'd typed it in plain text.

Use Base64 to make binary data transportable. Use real encryption — TLS in transit, something like AES or a secrets manager at rest — to keep data confidential.

Formats

Standard Base64 vs. Base64URL

Both formats encode data identically except for two characters. Standard Base64 uses + and /, which both have special meaning inside a URL and would need to be percent-encoded to survive one. Base64URL swaps those for - and _ instead, so the result can be dropped straight into a URL path, query string, or filename. Base64URL values also commonly drop the trailing =padding, since it's redundant once the original length is known.

FormatCharactersPaddingCommon uses
Standard Base64A-Z, a-z, 0-9, +, /Usually =Files, email and API payloads
Base64URLA-Z, a-z, 0-9, -, _Often omittedURLs, JWTs and query parameters
Examples

Try it with real values

ExampleTextBase64Action
Plain textHello World
SGVsbG8gV29ybGQ=
URL-safe charactersHello World? / + test
SGVsbG8gV29ybGQ/IC8gKyB0ZXN0
Unicode (Urdu, Arabic & emoji)پاکستان 🇵🇰 مرحبا 😀
2b7Yp9qp2LPYqtin2YYg8J+HtfCfh7Ag2YXYsdit2KjYpyDwn5iA
Why 33%

Why Base64 output is roughly a third larger

Base64 encodes 3 bytes of input as 4 output characters — every 8-bit byte becomes six-bit chunks, and six-bit chunks need more characters to represent the same information. 3 bytes is 24 bits, which splits evenly into four 6-bit groups, each mapped to one of the 64 Base64 characters. That 3-in, 4-out ratio is exactly 4/3, a 33% size increase, before accounting for any padding.

This is worth remembering before embedding something large: a 3 MB image becomes roughly 4 MB of text once Base64-encoded, plus whatever overhead the surrounding format (JSON, HTML, XML) adds on top.

Where it's used

Common uses for Base64

  • API payloads — embedding small binary attachments (images, files) directly inside a JSON request or response body.
  • Data URLs — inlining an image or font directly into HTML or CSS as data:image/png;base64,… so it loads without a separate request.
  • Email attachments — MIME-based email has encoded attachments as Base64 since the format only reliably carries plain text.
  • JWT-related data — JSON Web Tokens encode their header and payload segments as Base64URL (the signature makes them tamper-evident, not secret — never put confidential data in a JWT payload).
  • Basic authentication headers — HTTP Basic Auth sends username:password Base64-encoded in the Authorization header, which is why Basic Auth requires HTTPS to be safe at all.
  • Embedding small assets — icons, tiny SVGs, or fonts that are cheaper to inline as Base64 than to fetch as a separate file.
Trade-offs

When Base64 should not be used

Skip Base64 whenever the underlying transport already supports binary data directly — an image served from /uploads/photo.jpg, or a file upload sent as multipart/form-data, is smaller and faster than the same bytes wrapped in Base64 and JSON.

Large images and files usually shouldn't be embedded directly in HTML or JSON either. A Base64 data URL can't be cached independently by the browser the way a normal image request can, it inflates the size of the document it's embedded in (slowing down parsing and the initial render), and it can't be lazy-loaded. For anything beyond a small icon or a one-off asset, a real file request almost always outperforms an inlined one.

And, worth repeating: never use Base64 as a substitute for encryption or access control.

Keep going

More developer tools

Base64 often shows up right alongside API work — the API Response & JSON Inspector helps you explore a payload that might carry an encoded field. If you're debugging Basic Auth headers or JWTs on mobile, the Mobile Deep Link Generator & Validator covers the surrounding configuration. Need sample records to test any of this against? The Mock Data Generator builds CSV, JSON, and SQL fixtures from a schema. And for more free tools like this one, browse the full Developer Resources Directory.

FAQ

Common questions

What is Base64 encoding?+

Base64 is a way of representing binary data — or any text — using only 64 printable ASCII characters (A–Z, a–z, 0–9, and two symbols). It's used whenever raw bytes need to travel safely through systems that only handle text, like JSON payloads, URLs, or email.

Is Base64 the same as encryption?+

No. Base64 is an encoding, not encryption — it has no secret key, and anyone can decode it back to the original data instantly. It should never be used to protect passwords, tokens, or anything confidential; use actual encryption for that.

Is my data uploaded to 92 Nodes?+

No. Every conversion happens locally in your browser using standard Web APIs. Nothing you type or upload — text, files, or the resulting Base64 — is sent to a server or included in analytics.

What is the difference between Base64 and Base64URL?+

They use the same underlying scheme with two characters swapped: standard Base64 uses + and /, while Base64URL uses - and _ instead so the result is safe to place directly in a URL or filename without extra escaping. Base64URL also commonly omits the trailing = padding.

Why does Base64 make data larger?+

Base64 packs 3 bytes of input into 4 output characters, so encoded data is roughly 33% larger than the original. That overhead is the trade-off for representing arbitrary bytes as plain text.

Can I encode or decode files?+

Yes — switch to File mode to drag and drop or browse for a file, encode it to raw Base64 or a Data URL, and copy or download the result. You can also paste Base64 or a Data URL back in to decode and download the original file.

Can Base64 be decoded without padding?+

Yes. Valid unpadded Base64 is automatically normalized and decoded correctly — you don't need to add the trailing = characters back yourself.

Is there a file-size limit?+

Yes, File mode is limited to 10 MB per file so large uploads don't freeze your browser tab. Text mode doesn't enforce a hard limit, but very large pastes are still processed locally and may take a moment.

92 Nodes

Have a project in mind? Let's build it.

Tell us about your goals and we'll get back to you within one business day with next steps.

Book a free call