ForHosting KIT · Developer Utilities

ASCII code lookup

Look up any ASCII character or code and see it every way at once: A is decimal 65, hex 41, octal 101 and binary 1000001. Codes can be typed as 65, 0x41 or 0o101, and controls show names like LF. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Search
A
You get
Direction
char_to_code
Char
A
Display
A
Name
A

When you need the decimal code for a letter, the hex byte for a newline, or the glyph behind octal one hundred one, this capability answers in one deterministic step. Send a single character or a numeric code written as decimal, 0x-prefixed hex, or 0o-prefixed octal; the engine returns the character, a safe display form, the conventional control name when applicable, and decimal, hex, octal, and binary representations together.

Every way of writing an ASCII code, in one lookup

Type a single character or a numeric code and you get the character, a safe display form, the usual control name where there is one, and the decimal, hex, octal and binary values together. Decimal runs from 0 to 127. Binary is a seven-bit pattern padded with leading zeros, which makes bit patterns easy to teach. The display form spells out tab, line feed, carriage return and other controls as short escape sequences, so nothing invisible ends up on screen. The name gives mnemonics such as NUL, LF, CR, ESC, SPACE and DEL. Use decimal for systems that expect whole numbers, hex when documenting byte dumps and names when teaching the control set.

How your input is read, and the usual slips

One character is always treated as a character, so the digit 5 returns the glyph five, not code five. A value of several digits, such as 65, is read as a decimal code, while 0x41 and 0o101 select hexadecimal and octal explicitly, which helps when copying from dumps or shell listings. Codes above 127 are refused rather than drifting into Unicode, and so are empty input, negative numbers and fractions. Students use it to compare LF and CR or to see why 128 fails, and engineers use it to turn control bytes from a dump into named symbols.

Reading the response: decimal, hex, octal, names, and printability

The decimal field is the integer code point from zero to one hundred twenty-seven. Binary is a seven-bit string padded with leading zeros for teaching bit patterns. The char field is the actual JavaScript character from String.fromCharCode; display is a printable-safe form that escapes tab, line feed, carriage return, and other controls as slash sequences so UIs never render invisible glyphs.

Name holds the conventional ASCII mnemonic such as NUL, LF, CR, ESC, SPACE, or DEL for the control and special slots, or the glyph itself for ordinary printables. Use decimal when talking to APIs that expect integers, hex when documenting byte dumps, and name when teaching students the control set without forcing them to memorize every number.

Homework and encoding drills

Students look up characters and codes in decimal, hex, and octal, compare control names such as LF and CR, and get a clear error when a value above 127 is submitted by mistake.

Protocol and firmware debugging

Engineers convert control bytes from dumps into named ASCII symbols and verify that a decimal or hex constant really maps to the expected printable character.

How do I look up the ASCII code for a character?

The response includes decimal, hex, octal, binary, and a conventional name when applicable.

Is the ASCII code lookup free?

The browser tool runs free on your device.

Can I look up control characters like newline?

Yes. Send the single character or its code (for example 10 or 0x0A).

How do I enter a hex or octal code?

Add a prefix: 0x for hexadecimal, as in 0x41, and 0o for octal, as in 0o101. Plain digits are read as decimal, so 65, 0x41 and 0o101 all point to the same letter A.

Why does typing 5 show the character five instead of code 5?

A single character is always looked up as a character, digits and space included. Only a value of two or more digits, such as 65, or one with a 0x or 0o prefix is read as a numeric code.

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.

POSThttps://api.kit.forhosting.com/enc/ascii-lookup

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.

curl -X POST https://api.kit.forhosting.com/enc/ascii-lookup \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"A"}'
{
  "query": "A"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "enc.ascii_lookup",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

ASCII maps the classic 128 seven-bit values from zero through one hundred twenty-seven onto control signals and the printable Latin character set that still underpins email headers, HTTP tokens, source code, and countless binary formats. Codes above 127 are rejected with invalid_input so the contract stays honest about seven-bit ASCII rather than silently entering Unicode.

What to send: character or code, and how formats are detected

A string of length one is always treated as a character, including digits and space, so sending A yields decimal sixty-five and sending the digit five yields decimal fifty-three for the glyph five itself. A pure multi-digit decimal string such as sixty-five is read as a numeric code, not as two characters. Prefixed forms 0x41 and 0o101 select hexadecimal and octal code bases explicitly, which is useful when you are copying values from dumps, C escapes, or shell listings. Put the value in the required field query (aliases value, input, text, q, char, and code are accepted). JSON numbers are accepted as decimal codes so pipelines can pass integers without quoting. Empty input, multi-character text that is not a recognized numeric form, non-integers, negative codes, and any code above one hundred twenty-seven raise invalid_input and are not charged. Identical queries always produce identical JSON because the path is pure integer and string arithmetic with no network, no random seed, and no wall clock.

Reading the response: decimal, hex, octal, names, and printability

On success the response echoes the normalized query string and a direction flag of char_to_code or code_to_char so clients know which interpretation was used. Hex is a two-digit uppercase string without a prefix, and hex_prefixed adds the familiar 0x form for paste into source. Octal and octal_prefixed follow the same pattern with a 0o prefix. The is_printable boolean is true for codes thirty-two through one hundred twenty-six inclusive.

API usage, pricing, classroom workflows, and practical limits

Remember that this product is intentionally seven-bit: emoji, accented letters above one hundred twenty-seven, and full Unicode code points are out of scope and fail closed. Send a JSON body with the required query string or an integer code and call the free in-browser ASCII code lookup for homework, encoding cheatsheets, protocol debugging, and quick mental checks without installing a local table or spreadsheet. Use the prepaid API when a coding platform, documentation generator, firmware tooling suite, or data-cleaning pipeline needs a stable contract under KIT balance at $0.002 per successful item; validation failures never consume balance after the engine rejects the request. Pair this endpoint with hex text converters when the next step is multi-byte UTF-8, or with URL and base64 tools when the character will travel on the wire. Authors shipping SDKs can map decimal, hex_prefixed, and name directly into tables that match classic ASCII charts students still use on paper.

Docs and cheatsheet generators

Pipelines build ASCII reference tables and SDK examples from a stable JSON contract instead of hard-coding fragile chart data in every language.

How do I convert a code back to a character?

Send a decimal code as a multi-digit string ("65"), a JSON number (65), hex ("0x41"), or octal ("0o101"). The response returns the matching character and all representations.

What happens if the code is above 127?

The request fails with invalid_input. This capability implements classic 7-bit ASCII only; values above 127 are rejected and not charged.

Read the full KIT documentation →