Decodificador e codificador Hex

Cole hex em qualquer formato e veja o texto na hora, ou converta texto em hex. Não sabe o que é uma sequência hex? A IA explica e decodifica o Base64, gzip ou XOR que ela contém.

Tags: codificador codificar/decodificar hex

🚀 177,388 conversões totais (279 este mês)
Inspetor de bytes
Tamanho
Decimal
Little-endian
Com sinal
Binário
Octal
UUID
Cor
Base64
Dump hex

      

Pratique Python com desafios de código

Resolva problemas práticos direto neste editor: rode os testes de exemplo, envie sua solução e receba uma revisão de código por IA.

Todos os desafios de Python
Fácil

Rectangle Perimeter

Compute the perimeter of a rectangle from its sides.

Você vai aprender AritméticaValores de retorno
inicianteLearning-pathVariables
Fácil

Distance Between Points

Compute the straight-line distance between two points.

Você vai aprender Teorema de PitágorasRaízes quadradas
iniciantefunçõesLearning-pathmatemática
Fácil

Average of Three

Average three whole numbers.

Você vai aprender AritméticaDivisão
inicianteLearning-pathVariables
Fácil

Produto escalar de dois vetores

Multiplique dois vetores elemento a elemento e some os resultados, a operação central de todo neurônio.

Você vai aprender VetoresProduto escalar
Redes neuraisaiaprendizado de máquina
Fácil

Verificação de Número Primo

Decida se um número é primo.

Você vai aprender DivisibilidadeOtimizar laços
iniciantelaços de repetiçãonúmerosestudante iniciante
Fácil

Contar Letras Maiúsculas

Conte as letras maiúsculas em um texto.

Você vai aprender Verificar caracteresContagem
inicianteLearning-pathStrings
Fácil

Celsius to Fahrenheit

Convert a temperature from Celsius to Fahrenheit.

Você vai aprender FórmulasPrecedência de operadores
inicianteLearning-pathVariables
Fácil

Dias em um Mês

Retorne quantos dias tem um mês, incluindo anos bissextos.

Você vai aprender Regras do calendárioFunções auxiliares
iniciantecondicionaisfunçõesLearning-path
Fácil

Min and Max Together

Find the smallest and largest value in one pass.

Você vai aprender Uma única passadaVários valores de retorno
ArraysiniciantefunçõesLearning-path
Fácil

Largest of Three

Pick the largest of three numbers without a built-in max.

Você vai aprender ComparaçõesCombinar condições
iniciantecondicionaisLearning-path
Fácil

Simple Interest

Find the total amount after simple interest.

Você vai aprender PorcentagensProblemas com enunciado
inicianteLearning-pathVariables
Fácil

Swap First and Last

Exchange the first and last items of a list.

Você vai aprender Índices de listasTroca
ArraysinicianteLearning-path

Introdução

Esta ferramenta online de codificação Hexadecimal facilita a conversão de strings para o formato hexadecimal e vice-versa. Seja trabalhando com texto ou números, esta ferramenta simplifica o processo e economiza seu tempo.

Como Usar Esta Ferramenta

  1. Cole sua string diretamente no editor ou digite-a.
  2. Clique no botão Codificar ou Decodificar para converter sua string para ou do formato hexadecimal.
  3. Após codificar ou decodificar, você pode:
    • Baixar o resultado.
    • Salvar ou compartilhar com outros usando um link curto.
    • Entrar com Google ou GitHub para salvar seus resultados na sua conta para uso posterior.

O que é Hexadecimal?

Hexadecimal (ou hex) é um sistema de numeração base-16 que simplifica a representação de dados binários. Ele usa 16 símbolos: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. Cada dígito hex representa uma sequência binária de 4 bits, tornando muito mais fácil escrever e ler números binários.

Por exemplo:

  • Binário para Hex: 11010100 → D4
  • Hex para Binário: FFFF3 → 11111111111111110011

Por que Usar Hexadecimal?

Hexadecimal é comumente usado em computação e sistemas digitais porque é mais compacto e legível do que binário. É frequentemente usado para endereços de memória, códigos de cores e representação de dados em conjuntos de caracteres ASCII ou Unicode.

Para mais detalhes, confira este guia útil.

Exemplos

Antes de codificar

      
Hello, World!
      
    

Depois de codificar

      
48656c6c6f2c20576f726c6421
      
    

Decodificar hex em texto: formatos aceitos

Cole o hex do jeito que você encontrou. O decodificador remove espaços, vírgulas, dois-pontos e os prefixos 0x, \x ou %, e transforma cada dois dígitos em um byte.

Hex que você colaTexto que você recebe
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😀

Os bytes são lidos como UTF-8, então acentos, cirílico, chinês, japonês, coreano e emojis são decodificados corretamente.

Hex é uma cifra?

Enigmas e CTFs costumam chamar de "cifra hex", mas hex é uma codificação, não criptografia: cada par de dígitos é um byte e qualquer pessoa consegue ler de volta com um decodificador como este. Para esconder dados, use criptografia de verdade; para conferir se não mudaram, use um hash como SHA-256.

Como decodificar hex à mão

Separe o hex em pares. Cada par é um número de 0 a 255: o primeiro dígito conta dezesseis e o segundo as unidades (a = 10 até f = 15). Procure o número na tabela ASCII para achar a letra.

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

Tem Base64? Converta Base64 em 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.