Skip to content

Base64 Encode and Decode

Convert text to and from Base64.

  • Free
  • No sign-up
  • No watermark
  • Works in your browser

Also called: Base64 converter, Base64 decoder, Base64 encoder.

About Base64 Encode and Decode

Encode text to Base64 or decode Base64 back to text. Base64 is a way of representing data using only letters, numbers and a few symbols, so it can travel safely through systems built for plain text such as email, JSON and URLs. This tool handles Unicode correctly, supports the URL-safe variant, and tells you when decoded data is binary rather than text.

How to use Base64 Encode and Decode

  1. Choose Encode or Decode.
  2. Paste your text or Base64 string.
  3. Optionally choose URL-safe output, padding and line wrapping.
  4. Copy the result.

Tips and good to know

  • Base64 is an encoding, not encryption — anyone can decode it. Never use it to hide secrets.
  • Encoded data is roughly one third larger than the original.
  • URL-safe Base64 replaces + and / with - and _ so the string can be used inside web addresses.

Base64 is encoding, not encryption

Base64 turns any bytes into 64 safe text characters so binary data can travel through systems built for text, such as email, JSON, data URLs and HTTP headers. Every 3 bytes become 4 characters, so the result is about 33% larger. Anyone can decode it instantly, so it hides nothing. The URL-safe variant replaces + and / with - and _ so the text can sit in a web address.

How Base64 works

Base64 takes the data three bytes (24 bits) at a time and splits it into four groups of six bits. Each six-bit group is a number from 0 to 63 that maps to one of 64 safe characters: A–Z, a–z, 0–9, + and /. When the input is not a multiple of three bytes, = signs pad the end. That is why encoded data is about 33% larger than the original.

Base64 is everywhere: email attachments, data URLs that embed small images in CSS, basic HTTP authentication headers and JSON Web Tokens all use it.

Frequently asked questions

Why does decoding fail?

The input probably contains characters that are not valid Base64, or it is missing padding. Try removing spaces and line breaks, or switch the URL-safe option.

Is Base64 Encode and Decode free?

Yes. Base64 Encode and Decode is free: no sign-up, no paid plan, no trial and no limit on how often you use it. It runs in your browser, and ToolzAura is paid for by ads, so every tool stays free.

Are my files uploaded?

No. This tool runs in your browser, so your input stays on your device.

Maintained by Malik Shaheer · Last reviewed · How we test tools · Report a problem

Guides for Base64 Encode and Decode

Related tools

Binary Translator

Convert text to binary and back.

Developer Tools

Hash Generator

Create SHA-1, SHA-256 and SHA-512 hashes.

Developer Tools

JWT Decoder

Decode a JWT header and payload locally.

Developer Tools

Password Strength Checker

Test how resistant a password is to guessing.

Developer Tools

Unix Timestamp Converter

Convert between Unix timestamps and readable dates.

Developer Tools

TOTP Code Generator

Generate time-based one-time codes from a secret.

Developer Tools