Base64 es la codificación más utilizada para viajar con datos de texto en entornos que solo aceptan caracteres imprimibles: correos electrónicos, JSON, URLs, atributos HTML y mucho más. Aquí tienes qué es, para qué sirve, cómo usarla y por qué no es cifrado.
¿Qué es Base64?
Base64 es un sistema que toma datos binarios (bytes) y los representa usando 64 caracteres seguros: las 26 letras mayúsculas, las 26 minúsculas, los 10 dígitos y los símbolos + y /, con el carácter = como relleno (padding).
Cada 3 bytes de datos originales se convierten en 4 caracteres de Base64, lo que aumenta el tamaño aproximadamente un 33 %.
| Bytes originales | Caracteres Base64 |
|---|---|
| 1 byte | 4 caracteres (con relleno) |
| 3 bytes | 4 caracteres |
| 6 bytes | 8 caracteres |
| 100 bytes | 136 caracteres |
¿Para qué se usa Base64?
- APIs y JSON: transportar datos binarios (firmas, tokens) en campos de texto.
- Correo electrónico (MIME): adjuntar imágenes y archivos sin romper el protocolo SMTP.
- Imágenes inline en HTML y CSS: las
data:image/png;base64,...incluyen imágenes directamente en el código. - URLs y parámetros: transmitir bytes sin necesidad de codificación adicional.
- Almacenamiento temporal: guardar datos binarios en campos de texto plano de bases de datos.
Base64 no es cifrado
⚠️ Base64 es una codificación visible, no un cifrado. Cualquiera puede decodificarla en segundos, con o sin herramientas.
No lo uses para:
- ❌ Contraseñas o credenciales
- ❌ Datos personales sensibles (DNI, números de cuenta)
- ❌ Autenticación de seguridad
Para cifrado real utiliza herramientas como AES, HTTPS/TLS o el Web Crypto API.
Tabla de caracteres comunes → Base64
| Texto original | Base64 | Notas |
|---|---|---|
| A | QQ== | 1 byte con relleno |
| Hola | SG9sYQ== | Texto ASCII puro |
| Hola, Solvya 👋 | SG9sYSwgU29sdnlhIPCfpKE= | Incluye emoji (UTF-8) |
| ñ | w7E= | Carácter UTF-8 de 2 bytes |
| eyB9 | Llaves JSON |
El impacto de UTF-8
Base64 por sí solo solo entiende de bytes. La clave está en codificar y decodificar como UTF-8: así se conservan las tildes, eñes, caracteres cirílicos y emojis sin perder información.
Nuestra herramienta usa internamente TextEncoder y TextDecoder con UTF-8 para que el contenido tropical —como ¡Hola, mundo! o emojis como 👋 y 🔐— se conserve fielmente.
Cómo usar nuestra herramienta
- Elige el modo: “Codificar” (texto → Base64) o “Decodificar” (Base64 → texto).
- Escribe o pega en el campo de entrada el contenido que quieras convertir.
- Obtén el resultado al instante en el campo de salida; cópialo con un clic.
- Usa el botón “Invertir” para cambiar entre codificar y decodificar con un solo clic.
🔐 Todo es local: tu contenido nunca se envía a ningún servidor.
Conclusión
- Base64 convierte datos binarios en texto seguro que viaja sin problemas por APIs, correos y URLs.
- No es cifrado: no protege información; solo la transporta.
- El tamaño aumenta un 33 % respecto al original.
- Para conservar acentos y emojis, codifica y decodifica siempre con UTF-8.
Codifica y decodifica cualquier texto en Base64 al instante.
Base64 is the most widely used encoding for carrying text-based data through environments that only accept printable characters: email, JSON, URLs, HTML attributes and much more. Here is what it is, what it is used for, how to use it and why it is not encryption.
What is Base64?
Base64 is a system that takes binary data (bytes) and represents it using 64 safe characters: the 26 uppercase letters, the 26 lowercase letters, 10 digits and the symbols + and /, with = as padding.
Every 3 bytes of original data become 4 Base64 characters, increasing the size by approximately 33 %.
| Original bytes | Base64 characters |
|---|---|
| 1 byte | 4 characters (with padding) |
| 3 bytes | 4 characters |
| 6 bytes | 8 characters |
| 100 bytes | 136 characters |
What is Base64 used for?
- APIs and JSON: carrying binary data (signatures, tokens) in text fields.
- Email (MIME): attaching images and files without breaking the SMTP protocol.
- Inline images in HTML and CSS:
data:image/png;base64,...embeds images directly in code. - URLs and parameters: transmitting bytes without extra encoding.
- Temporary storage: saving binary data in plain-text database fields.
Base64 is not encryption
⚠️ Base64 is a visible encoding, not encryption. Anyone can decode it in seconds, with or without tools.
Do not use it for:
- ❌ Passwords or credentials
- ❌ Sensitive personal data (ID numbers, bank accounts)
- ❌ Security authentication
For real encryption use tools like AES, HTTPS/TLS or the Web Crypto API.
Common characters → Base64 table
| Original text | Base64 | Notes |
|---|---|---|
| A | QQ== | 1 byte with padding |
| Hola | SG9sYQ== | Plain ASCII text |
| Hola, Solvya 👋 | SG9sYSwgU29sdnlhIPCfpKE= | Includes emoji (UTF-8) |
| ñ | w7E= | 2-byte UTF-8 character |
| eyB9 | JSON braces |
The role of UTF-8
Base64 by itself only deals with bytes. The key is encoding and decoding as UTF-8: that way accents, eñes, Cyrillic characters and emojis are preserved without data loss.
Our tool internally uses TextEncoder and TextDecoder with UTF-8 so that content like ¡Hola, mundo! or emojis such as 👋 and 🔐 are faithfully retained.
How to use the tool
- Choose the mode: “Encode” (text → Base64) or “Decode” (Base64 → text).
- Type or paste the content you want to convert in the input field.
- Get the result instantly in the output field; copy it with one click.
- Use the “Swap” button to switch between encode and decode with a single click.
🔐 Everything is local: your content is never sent to any server.
Conclusion
- Base64 converts binary data into safe text that travels without issues through APIs, email and URLs.
- It is not encryption: it does not protect information; it only transports it.
- The size increases by approximately 33 % over the original.
- To preserve accents and emojis, always encode and decode using UTF-8.