Text to hex converter: letters to hex

Convert text strings to hexadecimal values.

Was this helpful?
Share Tool

This page translates a short string into space-separated hexadecimal Unicode code points and back. Type in the Text box and the Hex Codes box updates, or paste hex tokens on the right and the text rebuilds. Conversion is local. FlashKit does not upload the string, does not open a binary file, and does not need an account. The default sample is “Hello World”. Refreshing the tab restores that sample.

Each character becomes its Unicode code point printed in base 16 with JavaScript’s toString(16). That function emits lowercase letters and drops leading zeros. “H” is U+0048, printed as 48. “e” is 65. A space is 20. A newline is a, not 0a — a real pitfall if a spec wants two-digit bytes. Decoding splits on spaces or commas, parses each token with parseInt(token, 16), and uses String.fromCodePoint. Tokens with characters other than 0–9 and a–f (case-insensitive) show a red error and leave the last good text in place.

Worked example. Keep “Hello World”. You should see eleven tokens: 48 65 6c 6c 6f 20 57 6f 72 6c 64. That is H e l l o, a space, W o r l d. Change the first token to 49 and the text becomes “Iello World” because 49 hex is “I”. This is code-point math, not a file hex dump. The UTF-8 bytes of “é” are c3 a9; this page instead prints the single code point e9 for U+00E9. The grinning emoji is 1f600, one token, not the four UTF-8 bytes f0 9f 98 80.

Use this when a protocol note, CSS color-adjacent homework, or a debugging paste speaks hex code points. It is not xxd, not a PNG inspector, and not a 0x-prefixed C array exporter. There is no 0x on tokens, no colon separators, and no uppercase toggle. Sibling pages print the same points as decimal/ASCII or binary. If your paste looks like 01001000 01100101, you wanted the binary converter. If it looks like SGVsbG8=, you wanted Base64 — see the encoding guide.

The UI matches this copy. Text is the left textarea. Hex Codes is the right textarea. A one-line hint says codes are separated by spaces and that either field updates the other. Errors appear in a red banner above the grid. There is no file picker. Related tools: text-to-ASCII (same points in decimal), decimal to binary converter, JSON formatter (when you are embedding a hex string in a payload). Related guides: Base64 encoding and developer productivity. A longer hex to text walkthrough covers UTF-8 bytes versus these code-point tokens.

How to convert text and hex codes

  1. Type or paste text in the left box. Hex code points appear on the right, separated by spaces.
  2. Or paste space-separated hex tokens (0–9, a–f, optional leading zeros) in the right box to rebuild text.
  3. Fix any red error — a token with g, 0x, or a colon will not decode on this page.
  4. Copy the side you need. Pad to two digits yourself if a homework sheet requires 0a for newline.
  5. Close the tab when you are done. Nothing is stored.

Key Features

  • Bidirectional text ↔ hex Unicode code points
  • Lowercase toString(16) tokens; spaces or commas as separators
  • Clear error when a token is not valid hex
  • Local only — no file upload and no xxd dump
  • Same family as the ASCII, decimal, and binary converters

Character-to-hex table (common ASCII)

  • Letters: A = 41, B = 42, Z = 5a, a = 61, z = 7a. Digits: 0 = 30, 9 = 39. Space = 20. Newline = a (not 0a). Tab = 9.
  • “Hello World” in hex is 48 65 6c 6c 6f 20 57 6f 72 6c 64. Copy that list and it should round-trip.
  • Punctuation: ! = 21, @ = 40, comma = 2c, period = 2e. “Hi!” is 48 69 21.
  • Non-ASCII: é = e9, € = 20ac, 😀 = 1f600. Those are code points. UTF-8 for euro is e2 82 ac — three tokens you will not see here.
  • There is no 0x prefix. Paste 0x48 and the page reports an invalid hex code. Use 48.

Code points versus a file hex dump

  • A hex editor lists every byte of a file. This page lists one hex number per Unicode character in the text box.
  • ASCII letters happen to match one UTF-8 byte, so “A” is 41 either way. Multi-byte characters do not match.
  • Leading zeros are omitted. Newline is a, tab is 9. parseInt still treats 0a and a as 10, so padding is optional on decode.
  • Do not paste a PNG, a PEM certificate, or firmware. Those are byte streams. Use a desktop hex tool you control.
  • Need decimal or binary of the same points? Open the sibling converters. Need Base64? Read the Base64 guide.

Limits, privacy, and tips

  • Very long pastes can freeze the tab. Split the work.
  • JSON payloads that wrap a hex string still need quotes and commas — pair this page with the JSON formatter.
  • A–F and a–f both decode. Output is always lowercase because toString(16) is lowercase.
  • Privacy: the string never leaves this tab. Still avoid pasting secrets on a shared screen or projector.
  • Related tools: ASCII, decimal, and binary converters. Guides: Base64 encoding, developer productivity.

Frequently Asked Questions

Can I hex-encode a PNG or a .bin file?

Not here. Use a desktop hex editor or a data-URI workflow you control. This page converts short Unicode strings to hex code points.

Why is newline “a” instead of “0a”?

Tokens use JavaScript’s toString(16), which drops leading zeros. 0a and a are the same number when decoded. Pad yourself if a spec wants two-digit bytes.

Is this UTF-8 byte hex?

No. Each token is a Unicode code point in base 16. ASCII letters often match one UTF-8 byte; emoji and € do not.

What separators and prefixes are allowed?

Spaces or commas. No 0x, no colons, no \x. A token like 0x48 or 48:65 is an error.

Is my text uploaded?

No. Both boxes live in this tab. Refreshing restores “Hello World”. Nothing is written to FlashKit.

When should I use ASCII, decimal, binary, or Base64?

ASCII/decimal siblings print the same points in base 10. Binary prints base 2. Base64 is a different alphabet — see the guide. ASCII art is for banners, not numbers.

Expert Guide for Text to Hex

View Blog
Hex to Text: Decode Hexadecimal Strings (With Examples)

Hex to Text: Decode Hexadecimal Strings (With Examples)

Decode hex to text by hand and online. Worked examples turn 48 65 6C 6C 6F into Hello and show why UTF-8 bytes like E2 82 B9 become one character.

Read Guide

Categories

Browse all FlashKit tools