Free tool

Free Online Base64 Encoder & Decoder

Convert text to Base64 and back instantly. Unicode and URL-safe compatible. No sign-up.

0 chars
0 chars

Built by

Miguel Ángel Colorado Marin

Full-Stack Developer · Guadalajara, España

I develop web apps, digital tools and full projects — from design to deployment.

Contact me

How to use the Base64 encoder?

  1. 1

    Choose your mode

    Select Encode to convert plain text to Base64, or Decode for the reverse operation. You can switch modes at any time and the input content is preserved.

  2. 2

    Paste or type your content

    Enter the text to encode or the Base64 string to decode. The result is calculated automatically in real time with each keystroke, with no button press needed.

  3. 3

    Enable URL-safe if needed

    URL-safe mode replaces + with - and / with _ and removes padding =. This is essential when the Base64 output will form part of a URL or query string parameter.

  4. 4

    Copy or swap

    Use the Copy button to take the result to your clipboard with visual feedback. The swap button (⇄) moves the output to the input and switches mode automatically — perfect for verifying encodings.

Frequently asked questions

What is Base64?

Base64 is an encoding scheme that converts binary data into ASCII text using 64 characters (A-Z, a-z, 0-9, + and /). It is widely used to transmit binary data through systems that only support text, such as emails (MIME), data URIs in CSS/HTML, or JWT tokens.

What is URL-safe Base64 used for?

Standard Base64 uses the + and / characters, which have special meaning in URLs. The URL-safe variant replaces them with - and _ respectively, and removes the trailing = padding. It is the standard format for JWT (JSON Web Tokens) and OAuth 2.0 authentication.

How much does Base64 encoding increase file size?

Base64 increases size by approximately 33%. Every 3 bytes of original data become 4 Base64 characters. The tool shows the exact ratio so you can calculate it with your real data.

Does it work with emojis and special characters?

Yes. The tool converts text to UTF-8 before encoding, so it works correctly with any Unicode character: accented letters, emojis, Chinese characters, Arabic script, etc.

Is my data sent to any server?

No. All encoding and decoding happens entirely in your browser using native JavaScript APIs (btoa/atob). No data leaves your device.

Embed the encoder on your site

Embed this Base64 encoder in any web page with a simple iframe:

<iframe
  src="https://miguelacm.es/embed/base64"
  width="100%"
  height="600"
  frameborder="0"
  title="Base64 Encoder Decoder"
></iframe>
View embed in new tab →