Text to hex converter
Hello becomes 48656c6c6f: each of its 5 bytes turns into two hex digits, and accented letters or emoji expand to their full UTF-8 bytes. Paste hex back in to read the text again, with spaces, colons or 0x prefixes cleaned away. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Text
- Hello
- Result
- 48656c6c6f
- Calculation mode
- Encode
- Separator
- None
- Bytes
- 5
Hexadecimal notation is the everyday way to inspect and transport the raw bytes behind a string: each byte becomes two digits from zero through nine and a through f, so engineers can paste values into debuggers, network traces, firmware tools, and documentation without binary corruption. This text to hex converter turns plain Unicode text into that hex view using full UTF-8 serialization, or reverses the path by decoding a hex dump back into readable text. You choose a mode for encode or decode and an optional separator so outputs match compact digests, space-separated dumps, colon-separated MAC-style lists, or dash-separated styles. Odd-length hex strings after cleanup fail with a clear invalid input error instead of inventing a half-byte.
Encode text to hex with the separator you need
The engine serializes the string to UTF-8, then maps every byte to two lowercase hexadecimal digits so A becomes forty-one, space becomes twenty, and multi-byte characters such as accented letters or emoji expand to the correct multi-byte sequences.
Optional field separator controls how those pairs are joined: none produces a compact continuous string ideal for digests and hash-like pastes; space inserts a single space between bytes for classic dump readability; colon yields the familiar aa:bb:cc style used in device identifiers and packet summaries; dash produces aa-bb-cc for styles common in Windows and firmware notes. Empty strings are valid and encode to an empty result with zero bytes.
The response always includes result with the hex string, mode equal to encode, separator echoing the resolved choice, bytes equal to the UTF-8 length before encoding, and encoding equal to utf-8 so tests can assert both content and size. Identical inputs always produce identical outputs because the path is pure arithmetic with no network, no random salt, and no wall clock. Use encode whenever you need a paste-safe representation of a short message, a protocol sample, or a configuration fragment that must be compared byte-for-byte across tools.
Turning hex back into readable text
Set mode to decode and put a hexadecimal string in text. Leading and trailing spaces, tabs, and newlines are stripped, and internal spaces, colons, dashes, underscores, commas, and optional zero-x prefixes are removed so multi-line dumps and MAC-style pastes still work without manual cleanup. Any character outside zero through nine and a through f after cleanup is also rejected.
Successful decode returns result as the recovered string, mode decode, separator as provided or defaulted, bytes as the decoded UTF-8 length, and encoding utf-8. Prefer this capability when search intent is literally text to hex, hex to text, or string to hexadecimal for human-readable content; pure binary file workflows belong to file-oriented tools.
Everyday uses and practical limits
Call the free in-browser text to hex converter for classroom demos, support playbooks, protocol walkthroughs, and one-off inspections without installing xxd, hexdump, or language-specific helpers. A typical workflow encodes a short configuration token with separator none for compact storage, ships it through a ticket system, then decodes it on the receiving service with mode decode and asserts that bytes match the original length. Another workflow re-encodes with separator colon to match a network diagram style used in documentation screenshots.
Authors shipping SDKs can map the result field straight into a copy button, while mode, separator, and bytes labels make OpenAPI examples self-explanatory for readers comparing dump formats side by side.
What you can do with it
Protocol samples and support dumps
Encode short UTF-8 messages to hex for tickets and packet notes, choose space or colon separators for readability, then decode the same paste on the receiving side.
FAQ
How do I convert text to hex?
The result field contains lowercase hex; set separator to space, colon, or dash if you want bytes separated.
How do I decode hex to text?
Send mode decode and put the hex string in text.
What happens if the hex string has an odd length?
After separators are stripped, an odd digit count is rejected and not charged.
Is the text to hex converter free?
The browser tool runs free on your device.
Which separators are supported?
On encode: none (default compact), space, colon, or dash between bytes. On decode, spaces, colons, dashes, and optional 0x prefixes are accepted and stripped before parsing.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/enc/hex-text \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Hello"}'const res = await fetch("https://api.kit.forhosting.com/enc/hex-text", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"text": "Hello"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/enc/hex-text",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"text": "Hello"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/enc/hex-text", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"text":"Hello"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"text":"Hello"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/enc/hex-text", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"text": "Hello"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "enc.hex_text",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Encode text to hex with the separator you need
Send a JSON body with the required string field text set to the plain message you want to inspect as bytes, and leave mode at its default encode or set mode to encode explicitly. Aliases input, value, and s are accepted for the text field, and sep, delim, or delimiter may stand in for separator when older forms generate clients.
Decode hex back to text and reject bad payloads
After normalization the remaining character count must be even: each byte needs two hex digits, so an odd-length hex string raises invalid_input with an explicit message instead of padding a phantom nibble. Validation failures are not charged on the prepaid API, so probing a truncated dump is safe for operators.
API usage, pricing, workflows, and practical limits
Use the prepaid KIT API when a backend, serverless function, firmware test harness, or SDK needs the same encode or decode step under balance at $0.002 per successful item; failed validation never consumes balance after the engine rejects the request. Pair this endpoint with Base64 or URL encoding tools when a string must survive multiple text-only channels, but keep the steps separate so each landing page matches a single search intent.
Integration use cases
Docs and CI golden checks
Pin encode and decode fixtures—including an odd-length hex error—so documentation samples and continuous-integration tests fail fast if hex formatting ever drifts.
Education and debugging
Students and agents convert text to hex and back in the free browser widget, inspecting multi-byte UTF-8 sequences with clear invalid_input errors on truncated dumps.