Fletcher-32 checksum
Get a quick checksum that notices word order: 123456789 gives the Fletcher-32 value df09d509, and swapping characters usually changes it. Use it to catch accidental corruption or a truncated paste, not as a security hash. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Text
- 123456789
- Fletcher32
- df09d509
- Fletcher32 int
- 3,741,963,529
- Bytes
- 9
- Words
- 5
Fletcher-32 is a fast position-sensitive checksum that folds a message into a thirty-two-bit residual by walking sixteen-bit words with two modular running sums. Unlike a simple XOR or additive parity, the second sum accumulates the first, so the order of words matters and many common transposition errors change the digest. This Fletcher-32 checksum tool accepts plain text, serializes it as UTF-8, packs the bytes into little-endian sixteen-bit words, and returns an eight-digit lowercase hex string plus the matching unsigned integer, the byte and word counts, and an empty flag when the source string has zero length.
What Fletcher-32 means and how sixteen-bit words are formed
Fletcher-32 maintains two running totals, conventionally called sum1 and sum2, both reduced modulo sixty-five thousand five hundred thirty-five—that is two to the sixteen minus one. For each sixteen-bit word of the message, sum1 is increased by the word and then reduced, and sum2 is increased by the new sum1 and reduced the same way. The final checksum places sum2 in the high sixteen bits and sum1 in the low sixteen bits, yielding a full thirty-two-bit value usually shown as eight hexadecimal digits.
This capability encodes the input string as UTF-8 so multi-byte characters such as accented letters or emoji contribute their real on-the-wire bytes, then packs those bytes little-endian: the first byte of each pair becomes the low half of a word and the second byte the high half. If the UTF-8 length is odd, the last word is zero-padded in the high half so every byte participates without inventing extra data beyond a single zero pad.
Empty input processes zero words and yields eight zero hex digits with empty set to true, matching the natural identity of the sums. Fletcher-32 is designed for fast integrity checks against accidental corruption and truncated pastes; it is not a cryptographic hash and must not be used where deliberate collision resistance is required. If a third-party tool disagrees on the same UTF-8 bytes, it is almost always using big-endian packing, a different modulus, Fletcher-16 instead of Fletcher-32, or Adler-32 with its different initial sum1.
What you can do with it
Fast integrity tags for short text
Compute Fletcher-32 of configuration snippets, protocol samples, or filename stems when you need a compact hex residual that is sensitive to word order.
Classroom and support demos
Show students and operators how reordering or editing a few characters changes the Fletcher-32 hex without installing local utilities or cryptographic libraries.
FAQ
How are sixteen-bit words formed from my text?
The string is UTF-8 encoded, then each pair of bytes becomes one little-endian word (first byte low). An odd trailing byte is zero-padded in the high half. Both sums reduce modulo 65535.
Is Fletcher-32 a cryptographic hash?
No. Fletcher-32 detects accidental corruption and many reorderings quickly; it is not designed to resist deliberate collision or forgery. Use SHA-family tools when you need a cryptographic digest.
How is the Fletcher-32 checksum calculated?
Two running sums are kept, both reduced modulo 65535. Each sixteen-bit word is added to the first sum, then the first sum is added to the second. The final value puts the second sum in the high sixteen bits and the first in the low ones.
Why does another tool give a different Fletcher-32 result?
On the same bytes, the usual cause is a different recipe: packing words big-endian instead of little-endian, a different modulus, Fletcher-16 instead of Fletcher-32, or Adler-32, which starts its first sum at a different value.
What is the Fletcher-32 checksum of an empty text?
It is 00000000, and the result is marked as empty. Empty text is allowed on purpose, so optional fields always get the same stable value instead of an error.
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/fletcher32 \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"123456789"}'const res = await fetch("https://api.kit.forhosting.com/enc/fletcher32", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"text": "123456789"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/enc/fletcher32",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"text": "123456789"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/enc/fletcher32", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"text":"123456789"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"text":"123456789"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/enc/fletcher32", 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": "123456789"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "enc.fletcher32",
"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
No network call, no random salt, and no wall clock enter the computation—every successful path is pure arithmetic at the published $0.002 base price.
Input contract, response fields, and empty input behaviour
Empty string is allowed on purpose: many pipelines hash optional fields and need a stable zero residual instead of a hard failure. Algorithm is always the label Fletcher-32 and modulus is always the decimal string six-five-five-three-five so OpenAPI examples and support replies can quote the profile without ambiguity. There is no mode switch for Fletcher-16, Adler-32, or CRC-32: if you need those digests, use a dedicated capability so each landing page matches a single search intent and SEO slug. POST a JSON body with the required field text set to the string you want to checksum. Aliases input, value, s, string, and content are accepted so older forms and short clients still bind. Finite numbers and big integers are stringified before hashing; objects, arrays, booleans, null, Infinity, and NaN raise invalid_input and are not billed. When the source length is zero the response sets empty to true, fletcher32 to eight zero digits, fletcher32_int to zero, bytes to zero, and words to zero. For non-empty input empty is false, bytes equals the UTF-8 length, words equals the ceiling of that length divided by two, fletcher32 is the lowercase eight-digit hex residual without a zero-x prefix, and fletcher32_int is the same value as an unsigned thirty-two-bit integer useful in languages that prefer numbers over strings.
Where a Fletcher-32 checksum API earns its keep
Developers paste short configuration fragments, protocol samples, and filename stems into a Fletcher-32 checksum calculator when they need a compact integrity tag that is cheaper than a cryptographic hash and more order-sensitive than a plain sum. Support engineers recompute residuals from ticket text to confirm that a pasted dump was not truncated or reordered in transit. Education labs use the same endpoint to show that swapping two sixteen-bit words changes the hex digest, illustrating position sensitivity without introducing cryptographic machinery. Keep payloads under the documented character ceiling, treat the hex field as the canonical paste target, and you get reproducible Fletcher-32 values for docs, SDKs, edge workers, and classroom demos without standing up a separate checksum service.
Integration use cases
CI golden vectors and empty-input fixtures
Pin a known string → fixed hex digest and empty → 00000000 so continuous integration catches endianness, modulus, or UTF-8 encoding drift immediately.
Technical questions
How do I compute a Fletcher-32 checksum of text?
Send JSON with text set to your string. The fletcher32 field returns eight lowercase hex digits for the residual over UTF-8 bytes packed as little-endian sixteen-bit words; fletcher32_int is the same value as an unsigned integer.
What happens with empty input?
Empty text is valid. The response sets empty to true, fletcher32 to 00000000, fletcher32_int to 0, bytes to 0, and words to 0. Missing or non-string text raises invalid_input.
What does the Fletcher-32 checksum tool cost?
The browser widget is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.