Select Encode or Decode, choose Text or File input, paste or upload, then hit the button.

Modes

  • Encode — converts a plain text string or file to a Base64 string
  • Decode — converts a Base64 string back to the original text

Options

  • URL-safe — replaces + with - and / with _, safe for embedding in URLs without additional encoding
Tip: All processing is done locally in your browser. Files never leave your device.
URL-safe output (- _ instead of + /)
Output
How Base64 works

Base64 encodes binary or text data using only 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). Every 3 bytes of input become 4 Base64 characters — the output is roughly 33% larger than the original. It's encoding, not encryption: anyone with the string can decode it in one step.

When you need it

Embedding images or fonts in HTML/CSS as data URIs (data:image/png;base64,…), sending binary data inside JSON or XML (text-only formats), and HTTP Basic Auth headers all rely on Base64 to carry binary safely through text channels.

The = padding

Base64 works in 3-byte groups. If the input isn't a multiple of 3 bytes, = signs pad the output to the next multiple of 4 characters. One = means 1 byte was padded; == means 2 bytes. It's structural, not an error.

URL-safe variant

Standard Base64 uses + and /, which are reserved in URLs. The URL-safe variant replaces them with - and _. Used in JWT tokens and URL query parameters. The data is identical — only two characters differ.

Encoding ≠ Encryption

Base64 is completely reversible with no key. Never use it to "hide" sensitive data — anyone who sees the string can instantly decode it. For actual security use proper encryption (AES, RSA) or password hashing (bcrypt, Argon2).