Decodificador y codificador Hex

Pega hex en cualquier formato y obtén el texto al instante, o convierte texto a hex. ¿No sabes qué es una cadena hex? La IA lo explica y decodifica el Base64, gzip o XOR que lleva dentro.

Etiquetas: codificación/decodificación hex codificador

🚀 177,388 conversiones totales (279 este mes)
Inspector de bytes
Tamaño
Decimal
Little-endian
Con signo
Binario
Octal
UUID
Color
Base64
Volcado hex

      

Practica Python con desafíos de código

Resuelve problemas prácticos en este editor: ejecuta las pruebas de ejemplo, envía tu solución y recibe una revisión de código por IA.

Todos los desafíos de Python
Fácil

Rectangle Perimeter

Compute the perimeter of a rectangle from its sides.

Aprenderás AritméticaValores de retorno
principianteLearning-pathVariables
Fácil

Distance Between Points

Compute the straight-line distance between two points.

Aprenderás Teorema de PitágorasRaíces cuadradas
principiantefuncionesLearning-pathmatemáticas
Fácil

Average of Three

Average three whole numbers.

Aprenderás AritméticaDivisión
principianteLearning-pathVariables
Fácil

Producto escalar de dos vectores

Multiplica dos vectores elemento a elemento y suma los resultados, la operación central de toda neurona.

Aprenderás VectoresProducto escalar
Redes neuronalesaiaprendizaje automático
Fácil

Verificación de número primo

Determina si un número es primo.

Aprenderás DivisibilidadOptimizar bucles
principiantebuclesnúmerosestudiante principiante
Fácil

Count Uppercase Letters

Count the capital letters in a text.

Aprenderás Comprobar caracteresConteo
principianteLearning-pathStrings
Fácil

Celsius a Fahrenheit

Convierte una temperatura de grados Celsius a grados Fahrenheit.

Aprenderás FórmulasPrecedencia de operadores
principianteLearning-pathVariables
Fácil

Days in a Month

Return how many days a month has, including leap years.

Aprenderás Reglas del calendarioFunciones auxiliares
principiantecondicionalesfuncionesLearning-path
Fácil

Min and Max Together

Find the smallest and largest value in one pass.

Aprenderás Una sola pasadaVarios valores de retorno
ArraysprincipiantefuncionesLearning-path
Fácil

El mayor de tres

Elige el mayor de tres números sin usar una función máxima incorporada.

Aprenderás ComparacionesCombinar condiciones
principiantecondicionalesLearning-path
Fácil

Simple Interest

Find the total amount after simple interest.

Aprenderás PorcentajesProblemas de enunciado
principianteLearning-pathVariables
Fácil

Swap First and Last

Exchange the first and last items of a list.

Aprenderás Índices de listasIntercambio
ArraysprincipianteLearning-path

Introducción

Esta herramienta en línea de codificación hexadecimal facilita la conversión de cadenas a formato hexadecimal y viceversa. Ya sea que trabajes con texto o números, esta herramienta simplifica el proceso y te ahorra tiempo.

Cómo Usar Esta Herramienta

  1. Pega tu cadena directamente en el editor o escríbela.
  2. Haz clic en el botón Cifrar o Descifrar para convertir tu cadena a o desde el formato hexadecimal.
  3. Después de cifrar o descifrar, puedes:
    • Descargar el resultado.
    • Guardar o compartirlo con otros usando un enlace corto.
    • Iniciar sesión con Google o GitHub para guardar tus resultados en tu cuenta para uso posterior.

¿Qué es el Hexadecimal?

El hexadecimal (o hex) es un sistema de numeración base-16 que simplifica la representación de datos binarios. Utiliza 16 símbolos: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. Cada dígito hexadecimal representa una secuencia binaria de 4 bits, lo que facilita mucho la escritura y lectura de números binarios.

Por ejemplo:

  • Binario a Hex: 11010100 → D4
  • Hex a Binario: FFFF3 → 11111111111111110011

¿Por Qué Usar Hexadecimal?

El hexadecimal se utiliza comúnmente en informática y sistemas digitales porque es más compacto y legible que el binario. A menudo se usa para direcciones de memoria, códigos de color y para representar datos en conjuntos de caracteres ASCII o Unicode.

Para más detalles, consulta esta guía útil.

Ejemplos

Antes de codificar

      
¡Hola, Mundo!
      
    

Después de codificar

      
48656c6c6f2c20576f726c6421
      
    

Decodificar hex a texto: formatos admitidos

Pega el hex tal como lo encontraste. El decodificador quita espacios, comas, dos puntos y los prefijos 0x, \x o %, y convierte cada dos dígitos en un byte.

Hex que pegasTexto que obtienes
48656c6c6fHello
48 65 6c 6c 6fHello
0x48 0x65 0x6c 0x6c 0x6fHello
\x48\x65\x6c\x6c\x6fHello
48:65:6c:6c:6fHello
c3 a9 74 c3 a9été
f0 9f 98 80😀

Los bytes se leen como UTF-8, así que acentos, cirílico, chino, japonés, coreano y emojis se decodifican bien.

¿El hex es un cifrado?

Los acertijos y los CTF suelen llamarlo "cifrado hex", pero el hex es una codificación, no un cifrado: cada par de dígitos es un byte y cualquiera puede leerlo con un decodificador como este. Para ocultar datos usa cifrado de verdad; para comprobar que no cambiaron, usa un hash como SHA-256.

Cómo decodificar hex a mano

Separa el hex en pares. Cada par es un número de 0 a 255: el primer dígito cuenta dieciseises y el segundo unidades (a = 10 hasta f = 15). Busca el número en la tabla ASCII para obtener la letra.

48 → 4 × 16 + 8 = 72 → "H"
65 → 6 × 16 + 5 = 101 → "e"
6c → 6 × 16 + 12 = 108 → "l"

¿Tienes Base64? Convierte Base64 a hex

Hex to ASCII table

Printable ASCII characters by hex value: row is the first digit, column the second. 41 is "A", 61 is "a", 20 is a space.

0123456789ABCDEF
2 ␠ ! " # $ % & ' ( ) * + , - . /
3 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
4 @ A B C D E F G H I J K L M N O
5 P Q R S T U V W X Y Z [ \ ] ^ _
6 ` a b c d e f g h i j k l m n o
7 p q r s t u v w x y z { | } ~ DEL

Decode hex in code

The same conversion in common languages (UTF-8 text):

# Python
bytes.fromhex("48656c6c6f").decode("utf-8")          # 'Hello'
"Hello".encode().hex()                               # '48656c6c6f'

// JavaScript (Node.js)
Buffer.from("48656c6c6f", "hex").toString("utf8")    // 'Hello'
Buffer.from("Hello").toString("hex")                 // '48656c6c6f'

// Go
b, _ := hex.DecodeString("48656c6c6f")               // string(b) == "Hello"

// PHP
hex2bin("48656c6c6f");                               // 'Hello'

// C#
Encoding.UTF8.GetString(Convert.FromHexString("48656c6c6f"));

# Bash
echo 48656c6c6f | xxd -r -p                          # Hello

Hex decoder FAQ

How do I decode hex to text?

Paste the hex into the right box. It turns into text on the left as you type, in any format: 48656c6c6f, 48 65 6c 6c 6f, 0x48 0x65, \x48\x65, 48:65 or a hex dump from xxd. Type text on the left to get its hex.

Why does the decoded text show strange characters?

The bytes are not text in the selected encoding. Try UTF-16 or Latin-1 in "Text encoding". If it still looks like noise, the hex is binary data such as a hash, a key or a file: the byte inspector shows what it probably is, and Explain with AI can tell you more.

What does 0x mean in hex?

0x marks a hexadecimal number in C, Java, JavaScript, Python and most other languages, so 0x41 is 65 in decimal, the letter "A". The decoder removes 0x, \x and % prefixes for you.

How do I convert hex to decimal?

Paste the hex and look at the byte inspector: it shows the number in decimal (big-endian and little-endian), signed, binary and octal. For example FF is 255, and 01 00 is 256 in big-endian or 1 in little-endian.

What is the difference between hex and Base64?

Both write bytes as text. Hex uses two characters per byte, so it doubles the size but is easy to read. Base64 uses four characters for every three bytes, about 33% bigger, which is why it is used in emails, data URLs and JSON. If you paste Base64 here, the page offers to convert it.

Can I decode a hex dump or a whole file?

Yes. Paste output from xxd or hexdump -C and the offsets and text columns are ignored. Use "Open file" to see any file as hex, and "Download bytes" to save decoded hex as a file: PNG, JPEG, PDF, ZIP and other types are detected from their first bytes.

What does Explain with AI do?

It tells you what an unknown hex string probably is: a hash, a UUID, a file header, a network packet or text that is encoded again (Base64, gzip, XOR, ROT13). When more decoding steps are needed, your browser runs them and shows the result, so you see the real decoded data, not a guess.

Is my data sent to a server?

No. Decoding, encoding and the byte inspector run in your browser. The hex is only sent when you press Explain with AI, and then only to answer that question.