Encoding Tools

Base64 Encoder & Decoder

Encode text or files to Base64, or decode a Base64 string back to its original form — text, images, or any binary file — entirely in your browser.

Use the tool ↓
Text to encode0 chars
Output0 chars
Type text, paste a Base64 string, or upload a file.

About this tool

Base64 is an encoding scheme, not encryption — it converts arbitrary binary data into a string made up of only 64 printable ASCII characters (A–Z, a–z, 0–9, plus + and /, with = used for padding). The reason it exists is that a lot of the infrastructure the internet was built on — email systems, older text-based protocols, JSON and XML payloads, URL query strings — was designed to carry text safely, not arbitrary bytes. A raw image or a binary file can contain byte sequences that those systems would mangle or reject outright. Base64 sidesteps the problem entirely by re-expressing the data as plain text that any of those systems can pass through untouched.

In practice, developers run into Base64 constantly and in fairly predictable places. Embedding a small image directly inside a CSS file or an HTML page as a data URI avoids an extra network request. Sending a file as part of a JSON API payload — a profile photo upload, an attachment in a webhook — usually means Base64-encoding it first, since JSON has no native binary type. Basic HTTP authentication headers, some JWT segments, and a range of email attachment formats (MIME) all use Base64 under the hood. When something breaks in one of these paths — a broken image, a webhook payload that won't parse, an auth header that looks wrong — being able to decode the string by hand and see what's actually inside it is often the fastest way to find the problem.

It's worth being explicit about what Base64 is not: it provides no confidentiality. Anyone can decode a Base64 string back to its original content in one step, with no key or password involved — it is an encoding for compatibility, not a security mechanism. If you see credentials or sensitive data Base64-encoded somewhere, treat it as visible plain text, because functionally, it is.

This tool handles both directions. Encoding accepts typed or pasted text, or an uploaded file of any type — images, PDFs, archives — and produces the corresponding Base64 string, along with a one-click download if you need it as a .txt file. Decoding takes a Base64 string and reconstructs the original bytes; if the decoded content is a recognizable image format, it renders a preview directly on the page so you can confirm it decoded correctly before downloading. As with every tool in this hub, all of the encoding and decoding happens using your browser's built-in APIs — nothing is uploaded, and there's no size limit beyond what your device can hold in memory.

How to use it

01

Choose Encode or Decode

Switch modes at the top of the tool depending on whether you're starting from plain data or a Base64 string.

02

Type, paste, or upload

Type text directly, or upload any file — image, PDF, archive — to encode. To decode, paste a Base64 string into the input.

03

Check the result

The output appears instantly. Decoded images render a live preview so you can confirm the file is intact.

04

Copy or download

Copy the Base64 string to your clipboard, or download the decoded file — both happen locally.

Example

Plain text
Hello, Nesake!
Base64 encoded
SGVsbG8sIE5lc2FrZSE=

Common use cases

Embedding images in CSS

Turn a small icon into a data URI to skip an extra HTTP request.

Debugging a JSON file upload

Decode a Base64 field from an API payload to see the actual file it represents.

Inspecting auth headers

Decode a Basic Auth header to check exactly what credentials are being sent.

Reading email attachments

Decode a MIME-encoded attachment when debugging an email pipeline.

Sanity-checking a webhook

Confirm a Base64 payload from a third-party webhook decodes to what you expect.

Sharing small binary snippets

Pass a short binary value through a text-only channel like a chat message or a form field.

Frequently asked questions

Related tools

Related articles