Skip to content
AldeaCode Logo
Format100% local · 0 bytes sent

Base64 Encoder and Decoder

Convert text to Base64 (commonly used in data URIs, JWT, basic auth headers) and decode it back. Works correctly with emoji and any UTF-8 character. The URL-safe variant uses - and _ instead of + and / so the output is safe for URL params. Pair it with the URL Encoder when the value goes into a query string, with the JWT Decoder to inspect a token's payload, or with the SHA Hash Generator to fingerprint the bytes.

Loading…

How it works

Encoding: we run TextEncoder over the input to get UTF-8 bytes, then btoa to Base64. Decoding: atob gives us the bytes and TextDecoder reconstructs the original text. URL-safe mode swaps + and / for - and _ and strips padding.

How to use it

  1. Paste your text or data

    Drop in plain text, JSON, an emoji, or a small binary blob. UTF-8 multi-byte characters are handled correctly.

  2. Pick encode or decode

    Switch the toggle to encode (text to Base64) or decode (Base64 back to text). The URL-safe variant uses dash and underscore.

  3. Run the conversion

    The browser runs btoa or atob locally. There is no network call and your input never leaves the page.

  4. Copy the result

    Hit Copy to paste into a header, a data URL or a configuration file. Download the output as a text file if needed.

Use cases

Inspect a Base64 segment of a JWT (header or payload).

Encode an SVG snippet into a data URI.

Build a Basic auth header (user:password to Base64).

Round-trip text through email systems that strip non-ASCII.

Decode a Base64 string from a config file.

When NOT to use it

  • As encryption. Base64 is reversible by anyone, no key required. It is for transport (URLs, JSON, email), not confidentiality.
  • For files larger than a few MB if your destination cares about size. Base64 grows the payload by ~33%.
  • Where binary safety is needed but the receiver does not understand padded Base64. URL-safe variant strips padding for those cases.

Your data never leaves your browser

Every utility runs entirely on your device. Nothing is uploaded, nothing is stored on a server. You can disconnect from the internet and they keep working.

Frequently asked questions

Related tools

Curated next destinations. Use complementary tools in a pipeline; alternatives swap in for a different angle; next-step tools pick up where this one leaves off.