UTF-8 hex encoder
Type «Hi» and get 48 69: the two UTF-8 bytes of your text, each written as two hexadecimal digits. Choose the separator, add a 0x prefix or switch to capitals to match the format you need. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Text
- Hi
- Hex
- 48 69
- Bytes
- 72, 105
- Length
- 2
Encode a string to UTF-8 bytes shown as hexadecimal. Search intent: utf8 hex / string to hex utf-8. No network calls, no random seeds, and no server state are required for a correct answer.
What UTF-8 hex shows you
Computers store text as bytes, and UTF-8 is the encoding that turns each character into those bytes. Hexadecimal is the compact way people read them: every byte becomes exactly two digits, drawn from 0 to 9 and a to f. So the word «Hi» is stored as two bytes and written 48 69. Seeing the bytes is useful when you are teaching how text is stored and when a text tool needs the exact bytes rather than the letters. The same text always gives the same result, because the work happens in your browser with no network call, no randomness and nothing kept on a server.
Formatting the bytes the way you need
Different places expect bytes written in different ways, so three options shape the output. The separator decides what goes between one byte and the next: a space by default, or a comma, a dash or nothing for one continuous run of digits. The prefix adds the same marker before every byte, such as 0x, which many code listings and documents use to flag a hexadecimal value. The uppercase option writes the letters a to f as capitals. None of these changes the bytes themselves, only how they are displayed, so you can switch formats freely and copy the version that fits your notes or your tool.
How it works
Encode a string to UTF-8 bytes shown as hexadecimal. Uses TextEncoder; optional separator and prefix control formatting. The implementation is pure JavaScript with no external services.
No network calls, no random seeds, and no server state are required for a correct answer. Failed jobs are not billed. Landings target the stated search intent with precise keywords.
Prefer explicit units and ranges over silent coercion of bad types. When a field is optional, defaults are documented in params and echoed in the output.
When to use it
Use this when your search intent matches the calculator name and you need a reproducible answer for teaching, finance ops, GIS, text tooling, or unit history work. Encode a string to UTF-8 bytes shown as hexadecimal. No network calls, no random seeds, and no server state are required for a correct answer.
Failed jobs are not billed. Landings target the stated search intent with precise keywords. Prefer explicit units and ranges over silent coercion of bad types.
When a field is optional, defaults are documented in
FAQ
Does it call the network?
No. All math and text transforms are local and deterministic.
Can I put 0x in front of every byte?
Yes. Add a prefix and it is placed before each byte, which is handy when the bytes will be pasted into a code listing or a table that uses that notation. Leave it empty for plain pairs of digits.
Can I change the space between the bytes?
Yes. The separator is whatever you choose to put between one byte and the next: a space, a comma, a dash or nothing at all, if you need one continuous string of digits.
Can I get the letters in capitals?
Yes. Turn on uppercase and the hexadecimal letters come out as capitals instead of lowercase. The bytes themselves do not change; only the way the digits are written does.
How many bytes does my text take?
The result shows the count next to the hexadecimal. For «Hi» it is 2 bytes, written as 48 69, so you can check the size of a piece of text before you store or send it.
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/text/utf8-hex \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Hi"}'const res = await fetch("https://api.kit.forhosting.com/text/utf8-hex", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"text": "Hi"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/text/utf8-hex",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"text": "Hi"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/text/utf8-hex", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"text":"Hi"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"text":"Hi"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/text/utf8-hex", 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": "Hi"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "text.utf8_hex",
"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
The calculator is free in the browser, deterministic, and identical in the API path. Inputs are validated before any arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE results when decimals are requested. Use the same JSON contract from spreadsheets,
How it works
The calculator is free in the browser, deterministic, and identical in the API path. Inputs are validated before any arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE results when decimals are requested. Use the same JSON contract from spreadsheets, CMS hooks, automation, or teaching demos.
Inputs, limits and rounding
Optional decimals use half-up once. No network calls, no random seeds, and no server state are required for a correct answer. Failed jobs are not billed. Landings target the stated search intent with precise keywords. Prefer explicit units and ranges over silent coercion of bad types. When Provide the required parameters as JSON numbers or strings as documented. Invalid types, missing required fields, or out-of-range values raise invalid_input with a clear message. Outputs echo key inputs so automation can log the full context of each call. The calculator is free in the browser, deterministic, and identical in the API path. Inputs are validated before any arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE results when decimals are requested. Use the same JSON contract from spreadsheets, CMS hooks, automation, or teaching demos.
When to use it
The calculator is free in the browser, deterministic, and identical in the API path. Inputs are validated before any arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE results when decimals are requested. Use the same JSON contract from spreadsheets, CMS hooks, automation, or teaching demos.
Integration use cases
Quick check
Paste values in the free widget and compare with a spreadsheet.
Automation
Call the API with the same JSON contract from n8n, scripts, or CMS.
Teaching
Show the formula and pinned golden examples without proprietary software.
Technical questions
Is it free in the browser?
Yes. Tier A runs fully client-side with the same core as the API.
What happens on bad input?
The handler throws invalid_input; failed jobs are not billed.
Can I use it from the API?
Yes. Send the same JSON fields documented in params.
Who authors this?
Aspire (elon@forhosting.com), EN-only delivery; Nitro hydrates locales.