No upload, 100% local, no account

Base64 Encoder / Decoder

Encode text or files to Base64 (including data URIs), or decode Base64 back to text. Nothing leaves your device.

How Base64 Encoder / Decoder works

Base64 Encoder / Decoder converts text or binary data to Base64 and back, entirely in your browser. Paste a string and get its Base64 representation, or paste a Base64 string and decode it to readable text. Nothing you type or paste is transmitted anywhere; the conversion uses the browser's built-in btoa and atob functions (and TextEncoder for Unicode support).

Base64 is a standard encoding used in HTTP Authorization headers, data URIs, email MIME attachments, JSON payloads carrying binary content, and many API token formats. Having an offline, zero-upload encoder means you can safely encode sensitive credentials or binary blobs during development without routing them through an online service.

How to use Base64 Encoder / Decoder, step by step

  1. Select the mode: 'Encode' to convert text to Base64, or 'Decode' to convert Base64 back to text.
  2. Type or paste your input into the text area.
  3. The result appears immediately in the output area.
  4. Click the copy button to copy the result to your clipboard.
  5. Toggle 'URL-safe' if you need the URL-safe variant ('+' replaced with '-', '/' replaced with '_', no padding '=').

Common use cases

  • A developer needs to encode a username and password as Base64 for a Basic Authentication header in an API call.
  • A security researcher receives a Base64-encoded payload in a JWT or cookie and wants to inspect its raw content.
  • A systems integrator needs to encode a binary configuration file as Base64 to embed it in a YAML or JSON manifest.
  • A web developer encodes a small SVG icon as a Base64 data URI to inline it in a CSS file without an extra HTTP request.

Frequently asked questions

Does the text I encode get sent to any external service?

No. The encoding and decoding use the browser's native btoa and atob functions combined with TextEncoder/TextDecoder for full Unicode support. The entire operation is local. Nothing you type here reaches Sunasty or any third party.

What is the difference between standard Base64 and URL-safe Base64?

Standard Base64 uses '+' for value 62 and '/' for value 63, plus '=' padding. URL-safe Base64 replaces '+' with '-' and '/' with '_', which avoids conflicts when Base64 strings appear in URLs or file names. Both variants encode the same data; the difference is only in those two characters and optional padding.

Can I encode binary data such as an image or a PDF?

The text encoder works with string input. For binary files, use the Image to Base64 tool on this site, which reads a file using the FileReader API (readAsDataURL) and produces a full data URI including the MIME type prefix.

Why does decoding produce garbled output for some Base64 strings?

If the Base64 string encodes binary data rather than UTF-8 text, decoding it as text will produce unreadable characters. Base64 is encoding-agnostic; you need to know the original format of the data to interpret decoded output correctly.

Is Base64 a form of encryption?

No. Base64 is an encoding scheme, not encryption. Anyone who sees the Base64 string can decode it immediately without a key. For actual encryption of text in the browser, use the AES Encrypt tool on this site.

Do I need an account, and does it work on my phone?

No account, no sign-up. The encoder is a text box that works the same in mobile Chrome or Safari as on a computer, which is handy for a quick check of a token or header value away from your desk.