Base64 Encoder/Decoder

Encode text to Base64 or decode back. Remember: Base64 is not encryption.

{{ base64.message }}

Overview

Base64 was born from a very concrete problem: how to transmit binary data over systems that only understood 7-bit ASCII text. In the late 1980s, email was the primary means of digital communication, and the SMTP protocol was designed exclusively for plain text. Binary files — images, executables, documents — would corrupt or simply disappear in transit. The solution was the MIME standard, formalized in RFC 1341 in 1992 and revised in RFC 2045 in 1996, which included Base64 as the standard encoding mechanism. The logic is elegant: each group of 3 bytes (24 bits) is split into four 6-bit groups, and each 6-bit group is mapped to one of 64 safe ASCII characters — A-Z, a-z, 0-9, + and /. The result is 33% larger than the original in bytes, but can travel through any text-based system without corruption.

Today Base64 is everywhere, almost always invisible. JWTs are three Base64URL blocks separated by dots — the header, payload, and signature are readable by anyone who decodes the string, a constant reminder that Base64 provides no secrecy. Data URIs in CSS and HTML embed images and fonts directly in the document: `data:image/png;base64,iVBOR...` — useful for eliminating extra HTTP requests for small icons. HTTP Basic Auth encodes credentials in Base64 inside the `Authorization: Basic dXNlcjpzZW5oYQ==` header — decoding that value reveals the password in plain text, which is precisely why HTTPS is mandatory when using it. SSH public keys in `~/.ssh/authorized_keys`, TLS certificates in PEM format, webhook payloads with binary attachments — all use Base64.

The most common confusion about Base64 is treating it as security. A password encoded in Base64 is a password in plain text with an extra theatrical step. Any developer with `atob()` in the browser console or `base64 -d` in the terminal can decode it in seconds. Base64URL, the variant used in JWTs and OAuth URLs, replaces + with - and / with _ and removes the = padding so the string can appear in URL parameters without additional encoding. The = padding at the end of standard Base64 exists because the algorithm processes groups of 3 bytes: when the input is not a multiple of 3, one or two = signs are added to complete the block. This tool processes everything in the browser, without sending data to the server — handy for inspecting JWT tokens, API payloads, or any string you suspect is Base64-encoded.

Technical deep dive

Common questions summarized

  • Does Base64 protect sensitive data?: No. Anyone can decode Base64. Use proper encryption for secrets.
  • What is this tool for?: It runs fully in your browser: useful to validate, format, or convert data in everyday development.
  • Are my inputs sent to a server?: Processing happens locally with JavaScript. We do not store what you paste into the text areas.
  • Can I use this for real production data?: Use at your own risk. For secrets (passwords, tokens), prefer controlled environments and your company policies. And always review the generated contents. Never trust blindly things you see on the internet.

Sample payload to try

  • See also the larger "Code Snippets" sample; paste this excerpt to try locally: Text and Base64 — Texto: olá Base64: b2zDoQ==

Tool guide

  • What Base64 is An encoding that represents arbitrary bytes with 64 printable ASCII characters. Size grows (~33%), but binary can travel inside JSON, XML, email, and URLs.

  • What the tool does Encodes text (as UTF-8) to Base64 or decodes Base64 to text.

  • Why use it Inspect tokens, small attachments in data URLs, debug payloads. Not encryption: anyone can decode.

Code Snippets

Code example
Texto: olá
Base64: b2zDoQ==

Text and Base64

Texto: olá
Base64: b2zDoQ==

FAQ

Does Base64 protect sensitive data?

No. Anyone can decode Base64. Use proper encryption for secrets.

What is this tool for?

It runs fully in your browser: useful to validate, format, or convert data in everyday development.

Are my inputs sent to a server?

Processing happens locally with JavaScript. We do not store what you paste into the text areas.

Can I use this for real production data?

Use at your own risk. For secrets (passwords, tokens), prefer controlled environments and your company policies. And always review the generated contents. Never trust blindly things you see on the internet.