Codificador / Decodificador Base64
Codifique texto para Base64 ou decodifique Base64 de volta para texto rapidamente.
Base64 é um esquema de codificação para converter dados binários em strings ASCII. Usos comuns:
- Transmitir dados binários em URLs ou e-mails
- Incorporar dados de imagem em JSON ou XML
- Codificar credenciais (embora não seja criptografia)
- Codificação de autenticação básica HTTP
Aviso: Base64 é um método de codificação, não de criptografia. Não o utilize para proteger dados sensíveis.
Proximos passos sugeridos
Ferramentas Relacionadas
Codificador / Decodificador de URL
Codifique e decodifique URLs
Codificador / Decodificador de Entidades HTML
Codifique caracteres especiais em entidades HTML ou decodifique-os de volta
Escape / Unescape de String
Escapar e desescapar strings para HTML, JSON, JavaScript, SQL e mais
Conversor de Base Numérica
Converter números entre binário, octal, decimal e hexadecimal
Conversor de Timestamp
Converter entre timestamps Unix e datas legíveis
Consulta ASCII / Unicode
Pesquisar e consultar códigos de caracteres ASCII e Unicode
Como Usar
Cole ou Digite
Insira seu texto, código ou dados na área de entrada.
Escolha as Opções
Selecione a transformação ou formato que deseja aplicar.
Copie o Resultado
Copie a saída para sua área de transferência com um clique.
Por Que Usar Esta Ferramenta
100% Gratuito
Sem custos ocultos, sem planos premium — todos os recursos são gratuitos.
Sem Instalação
Funciona inteiramente no seu navegador. Nenhum software para baixar ou instalar.
Privado e Seguro
Seus dados nunca saem do seu dispositivo. Nada é enviado a nenhum servidor.
Funciona no Celular
Totalmente responsivo — use no seu celular, tablet ou desktop.
Base64 Encoding and Decoding Explained
Key Takeaways
- Base64 converts binary data into ASCII text, making it safe to transmit through text-only channels like email and JSON.
- Base64 is an encoding scheme, not encryption — it provides no security and can be decoded by anyone.
- All encoding and decoding happens in your browser — your data stays on your device.
Base64 encoding is one of the most fundamental data transformation techniques in web development. It represents binary data using 64 ASCII characters (A-Z, a-z, 0-9, +, /), enabling safe transmission of files, images, and binary content through text-based protocols. Understanding Base64 is essential for working with APIs, email systems, and data URIs.
Base64 encoding increases data size by approximately 33% compared to the original binary.
Size Overhead
Key Concepts
How Base64 Works
Base64 takes every 3 bytes (24 bits) of input and splits them into four 6-bit groups, mapping each to one of 64 printable ASCII characters. Padding with '=' is added when input length is not a multiple of 3.
Data URI Embedding
Base64-encoded images can be embedded directly in HTML and CSS using data URIs (data:image/png;base64,...), eliminating extra HTTP requests for small assets.
Email Attachments (MIME)
Email protocols like SMTP are text-based. Base64 encoding via MIME allows binary attachments like images and documents to travel safely through email systems.
Base64url Variant
The URL-safe variant replaces '+' with '-' and '/' with '_' to avoid conflicts in URLs and filenames. This variant is used extensively in JWTs and OAuth tokens.
Pro Tips
Never use Base64 for security — it is trivially reversible. Use proper encryption (AES, RSA) for sensitive data.
Avoid Base64-encoding large images inline; the 33% size increase negates the benefit of saving an HTTP request.
Use Base64url (RFC 4648 §5) instead of standard Base64 when the output will appear in URLs or filenames.
Most modern browsers support btoa() and atob() natively, but they only handle Latin-1 characters — use TextEncoder for Unicode.
All Base64 encoding and decoding is performed entirely in your browser. Your data is never transmitted to any external server, making this tool safe for sensitive content.