Convert ASCII to Scan Codes
Map ASCII characters to IBM PC XT set-1 keyboard scan codes. Runs entirely in your browser, so your data never leaves your device.
Runs on your device, nothing uploaded
0 chars · 0 lines
Output
Map ASCII characters to IBM PC XT set-1 keyboard scan codes.
Type or paste above to see the result here.
What you paste never leaves this tab
Convert ASCII to Scan Codes is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. On a normal site, the text you paste is sent to a server that can log it, cache it or keep it. Here it is read and transformed inside this tab and nowhere else.
- No upload
- No length limit
- Works offline once loaded
- Nothing stored or logged
How to use Convert ASCII to Scan Codes
- 1. Type the characters to translate. Enter text in the input pane. Each character is mapped to the IBM PC XT set-1 scan code of the key that produces it, so A yields 1E, the code for the A key.
- 2. Format with the separator. Separator chips arrange the hex codes. Space suits reading alongside a keyboard-controller datasheet, while Comma prepares the list for an array in emulator or driver code.
- 3. Remember scan codes track keys. Scan codes identify physical key positions, not characters, so capitals and shifted symbols are written as a Shift press (2A), the key, and a Shift release (AA). Release events on real hardware add 80 hex to the make code; turn on key releases to include them.
- 4. Copy the scan code sequence. Copy the values into your emulator input queue, BIOS-level experiment or driver test. The scan-codes-to-ASCII tool performs the reverse lookup when analyzing captures.
When to use Convert ASCII to Scan Codes
Convert ASCII to Scan Codes translates text into the set-1 make codes an IBM PC XT keyboard sends to the machine. Anyone working below the operating system, in BIOS code, DOS emulation or keyboard firmware, deals in scan codes rather than characters, and this mapping saves a trip through aging hardware references.
- Injecting keystrokes into emulators. DOSBox-style emulators and virtual machines accept synthetic keyboard input as scan codes. Convert the command you want typed and feed the sequence to the emulated keyboard controller.
- Developing keyboard firmware. A custom keyboard or converter for vintage PCs must emit correct set-1 codes. Generating the expected sequence for test phrases gives your firmware a ground truth to match.
- Writing OS-development keyboard drivers. A hobby OS reading port 60h receives raw scan codes long before any character mapping exists. Knowing what your test string looks like as codes makes the interrupt handler debuggable.
- Analyzing keylogger or capture data. A hardware capture of a PS/2 line shows hex bytes, not letters. Encoding candidate words to scan codes lets you match patterns in the capture to typed text.
Examples
Letter
Input
a
Output
1E
With Shift
Input
Hi!
Output
2A 23 AA 17 2A 02 AA
Word
Input
hi
Output
23 17
About the Convert ASCII to Scan Codes tool
Convert ASCII to Scan Codes does its work locally, right in the browser. Map ASCII characters to IBM PC XT set-1 keyboard scan codes. There is no upload step, no queue and no account, and your data never travels over the network.
It belongs to the ASCII Tools collection on EditSafely, a set of 81 small, focused ASCII utilities that share the same instant, private workspace.
You can shape the output with 3 settings, including Add Shift for capitals and symbols, Add key releases (break codes) and Separator, and the result refreshes the moment you change one. 3 worked examples further down the page show exactly what the tool produces for real inputs.
Running locally also makes the tool fast and dependable: results appear as soon as your input does, there is no server outage that can take it down mid-task, and confidential data can be processed without a second thought.
Frequently asked questions
Is Convert ASCII to Scan Codes free to use?
Yes, it is completely free. All 2,943 tools on EditSafely work without an account, a subscription or usage limits.
Is it safe to paste sensitive or confidential data?
Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.
How much text can I process at once?
There is no fixed limit; your device's memory is the ceiling. Up to 10 MB the result updates as you type, after a short pause that grows with the size. Above 10 MB a Run button appears so typing stays smooth, and files open up to 50 MB. A very long result shows its first 2,000 lines on screen, while Copy and Download always include all of it.
Do I need to sign up or install anything?
No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.
How do I use the result?
The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.