Codificador/Decodificador Base64

Codifique texto para Base64 ou decodifique Base64 para texto UTF-8 legivel. Suporta Base64 padrao e seguro para URL, tudo no navegador.

Publicidade
Publicidade

Encode and decode Base64 without uploading your data

Full UTF-8 support, URL-safe mode, and real-time conversion — right in your browser. No uploads, no sign-up, no limits.

100% privado
UTF-8 seguro
Grátis para sempre

Como usar

  1. 1

    Cole seu texto

    Digite texto comum para codificar ou cole uma string Base64 para decodificar.

  2. 2

    Escolha o formato

    Use Base64 padrao para dados comuns e URL-safe para tokens e query strings.

  3. 3

    Codifique, decodifique ou copie

    Execute a conversao e copie o resultado.

Por que usar esta ferramenta Base64?

Seguro para UTF-8

Lida com texto internacional sem quebrar caracteres.

Modo URL-safe

Adapta caracteres e padding para contextos web.

Somente no navegador

Util para snippets, tokens e valores privados de configuracao.

Publicidade

Understanding Base64 Encoding

What is Base64 and why use it?

Base64 is an encoding scheme that converts binary data into a text representation using 64 ASCII characters (A-Z, a-z, 0-9, +, /). The encoding process takes every 3 bytes of input and converts them into 4 Base64 characters. This ensures that any binary data — including images, executables, and encrypted bytes — can be safely transmitted through channels that only support text, such as email, JSON, XML, and URLs.

The most common use cases for Base64 are: embedding binary data in JSON or XML (where raw bytes would break the syntax), encoding images as data URIs in HTML/CSS, encoding JWT token payloads, transmitting credentials in HTTP Basic Auth headers, and storing binary data in text-based databases or configuration files.

Publicidade

Standard vs. URL-safe Base64

Standard Base64 uses + and / as two of its 64 characters. These characters have special meanings in URLs (+ means space, / is a path separator), which can cause problems when Base64 strings appear in URLs or file names. URL-safe Base64 (RFC 4648 §5) replaces + with - and / with _, and typically omits the = padding character.

JWT tokens use URL-safe Base64 for encoding the header and payload. If you try to decode a JWT payload with standard Base64, you may get an error because - and _ are not valid standard Base64 characters. Our tool handles both formats — simply toggle the URL-safe option to match your input.

Base64 is not encryption

Base64 provides no security or confidentiality. Anyone who has the Base64 string can decode it back to the original data in milliseconds. Never use Base64 to protect passwords, API keys, or other secrets. If you need to protect data, use a proper encryption algorithm like AES-256. Base64 is only useful for ensuring data compatibility across systems, not for security.

Publicidade

Casos de uso comuns

Real-world scenarios where a Base64 encoder/decoder is essential.

JWT Tokens

Decode JWT header and payload by Base64-decoding each part. Essential for debugging authentication flows.

Data URIs

Encode images, fonts, or small files as Base64 data URIs for embedding directly in HTML, CSS, or JSON.

Configuration Files

Encode binary data or special characters in YAML, JSON, or XML configuration files where raw bytes are not allowed.

API Credentials

Encode API keys and secrets for HTTP Basic Auth headers or other credential-passing mechanisms.

How does this compare to other Base64 tools?

A side-by-side comparison of popular Base64 encoding tools.

RecursoNovaToolsBase64Encode.orgBrowser btoa()
Privacidade (sem upload)100% localEnvia para o servidorLocal
Modo URL seguroManual
Suporte UTF-8btoa() fails on non-ASCII
Conversão em tempo realClique no botãoN/A
Auto-detect modeN/A
Compatível com celularLimitadoN/A
Funciona offlineApós carregar a página

Base64Encode.org uploads your data to their server. Our tool processes everything locally — your text never leaves your browser.

Base64 Quick Reference

Key facts about Base64 encoding.

Character Set

A-Z

Uppercase letters (26 characters).

Exemplo:QUJDRA== (encodes ABCD)
a-z

Lowercase letters (26 characters).

Exemplo:YWJjZA== (encodes abcd)
0-9

Digits (10 characters).

Exemplo:MDEyMzQ= (encodes 01234)
+ /

Standard Base64 special characters. + becomes - and / becomes _ in URL-safe mode.

Exemplo:Pj8+Pw== (encodes >?>?)
=

Padding character (0-2 at end). Omitted in URL-safe mode.

Exemplo:aGk= (encodes hi, 1 pad)

Key Facts

3 → 4

Every 3 input bytes become 4 Base64 characters.

Exemplo:abc → YWJj (3 bytes → 4 chars)
33%

Base64 output is approximately 33% larger than input.

Exemplo:300 bytes → 400 chars
UTF-8

Text is encoded as UTF-8 bytes before Base64 encoding.

Exemplo:é → w6k= (2 UTF-8 bytes)
Not encryption

Base64 provides no security. Anyone can decode it.

Exemplo:dGVzdA== → test (instantly reversible)

Perguntas frequentes

Para que serve Base64?
Base64 transforma texto ou dados binarios em caracteres ASCII para uso seguro em JSON, URLs, emails, tokens e arquivos de configuracao.
O tool suporta Unicode?
Sim. Ele usa UTF-8, entao acentos, emoji e texto multilíngue podem ser codificados e decodificados corretamente.
Meu texto e enviado para um servidor?
Nao. A conversao acontece localmente no navegador e sua entrada nao sai do dispositivo.
What is Base64 encoding used for?
Base64 turns binary or text data into ASCII characters so it can safely travel through JSON, URLs, emails, tokens, and configuration files. It is commonly used to embed images in CSS/HTML (data URIs), encode JWT payloads, transmit binary data over text-only protocols, and store binary blobs in databases that only support text. Base64 is not encryption — it provides no security or confidentiality. Anyone can decode Base64 back to the original data.
Esta ferramenta suporta texto Unicode?
Yes. The encoder uses UTF-8, so text with accents, emoji, Chinese, Japanese, Korean, and other scripts can be encoded and decoded correctly. The tool first converts the input string to a UTF-8 byte sequence, then encodes those bytes to Base64. On decode, it reverses the process. This avoids the common 'btoa() does not work with non-ASCII characters' error that occurs when using the native browser btoa() function directly.
Meu texto é enviado para um servidor?
No. Encoding and decoding happen locally in your browser with JavaScript. Your input never leaves your device. You can verify this by opening your browser's DevTools Network tab — no network requests are made when you encode or decode. This makes the tool safe for encoding API keys, tokens, credentials, and other sensitive data.
What is the difference between standard and URL-safe Base64?
Standard Base64 uses the characters A-Z, a-z, 0-9, +, and /, and pads the output with = characters. The + and / characters can cause problems in URLs and file names. URL-safe Base64 replaces + with - and / with _, and typically omits the = padding. URL-safe Base64 is used in JWT tokens, data URIs, and other contexts where the encoded string appears in a URL or file name. Our tool lets you toggle between standard and URL-safe modes.
Posso codificar arquivos binários (imagens, PDFs)?
This tool is designed for text encoding and decoding. For binary files, use a tool that reads the file as an ArrayBuffer and converts it to Base64. However, you can use this tool to decode a Base64 string that represents a binary file (like a data URI) and inspect the MIME type. For encoding images as Base64 data URIs, our Image Converter tool handles this automatically.
Why does my Base64 string not decode correctly?
The most common cause is a character encoding mismatch. If the original text was encoded as UTF-8 but decoded as Latin-1 (ISO 8859-1), non-ASCII characters will appear garbled. Another common issue is URL-safe Base64 being decoded as standard Base64 (or vice versa) — the - and _ characters are not valid in standard Base64. Make sure you select the correct mode (standard or URL-safe) for your input. Finally, check that the input string has the correct length — Base64 strings should have a length that is a multiple of 4 (after padding).
Is Base64 encryption?
No. Base64 is an encoding scheme, not encryption. Encoding converts data from one format to another using a publicly known algorithm, and anyone can decode it. Encryption uses a secret key to scramble data so that only someone with the key can read it. Never use Base64 to protect sensitive data — use proper encryption (AES, RSA) instead. Base64 is only useful for ensuring data compatibility across systems that handle text differently.
How much larger is Base64 compared to the original data?
Base64 encoding increases data size by approximately 33%. Every 3 bytes of input becomes 4 characters of Base64 output. For example, a 300-byte input produces a 400-character Base64 string. This overhead is the trade-off for ensuring the encoded data contains only ASCII characters that are safe to transmit over text-only channels. If bandwidth is critical, consider using a binary format instead of Base64.
A ferramenta funciona em dispositivos móveis?
Sim. A ferramenta é totalmente responsiva e funciona no iOS Safari e Android Chrome. The interface adapts to small screens with a stacked layout — input on top, output below, and mode controls accessible via toggle buttons. The encoding and decoding process runs locally on your phone, so it works even on slow network connections.
Posso usar isso para projetos comerciais?
Sim. A ferramenta é gratuita para uso pessoal e comercial, sem marcas d'água, sem atribuição obrigatória e sem limites de uso. Você mantém a propriedade total dos seus dados. Não é necessário registro, chave de API ou assinatura.

Sua privacidade é nossa prioridade

Esta ferramenta funciona inteiramente no seu navegador. Seus arquivos não são enviados para um servidor, nem armazenados, nem analisados.

  • Não enviamos, armazenamos ou analisamos seus arquivos.
  • Tudo o que você processa permanece no seu dispositivo.
  • Não há processamento do lado do servidor, nem armazenamento em nuvem, nem análise.

Mesmo se sua conexão com a internet cair, seus arquivos permanecem seguros.

Você também pode gostar

Guias uteis

Publicidade