EditSafely

Convert ASCII to PETSCII

Map ASCII characters to Commodore PETSCII codes. Runs entirely in your browser, so your data never leaves your device.

0 chars · 0 lines

Output

The result appears here as you type.

Options

How to use Convert ASCII to PETSCII

  1. 1. Paste your ASCII text. Enter the text bound for a Commodore machine. The tool translates each character into its PETSCII code, the character set used by the PET, VIC-20 and C64 family.
  2. 2. Choose the separator. The Separator option joins the output codes. Commas produce a sequence ready for a Commodore BASIC DATA line, while spaces keep the list easy to scan during manual checks.
  3. 3. Watch for the case swap. PETSCII famously swaps letter cases relative to ASCII: uppercase A maps to code 193 in the common convention while unshifted letters occupy the ASCII uppercase range. The tool applies the mapping consistently.
  4. 4. Copy the PETSCII codes. Copy the numbers into your emulator, cross-assembler or BASIC listing. POKEing them into screen memory on a C64 reproduces your text on the vintage display.

When to use Convert ASCII to PETSCII

Convert ASCII to PETSCII maps modern text onto the Commodore character set, quirks and all. PETSCII rearranged letter cases and packed in graphics characters, so naive byte copying between a PC and a C64 garbles text. Retro developers and archivists use this mapping to move strings across correctly.

  • Developing C64 homebrew software. Strings in a cross-assembled Commodore project must be PETSCII at runtime. Converting your source text here produces the byte values your .byte directives need for correct on-screen output.
  • Typing programs into an emulator. Entering a program via VICE that stores message data as codes requires the PETSCII values, not ASCII ones. This tool provides them so the running program prints what you intended.
  • Preparing text for disk image tools. Filenames and sequential files on a D64 image are PETSCII-encoded. Converting names in advance stops directory listings from showing swapped-case or graphic-character junk.
  • Writing about Commodore internals. An article on the C64 needs accurate examples of the ASCII-to-PETSCII case flip. Quote conversions from this tool instead of reconstructing the mapping from memory.

Examples

Letter

Input

A

Output

193

Word

Input

Hi

Output

200 73

About the Convert ASCII to PETSCII tool

Convert ASCII to PETSCII does its work locally, right in the browser. Map ASCII characters to Commodore PETSCII 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 the Separator setting, and the result refreshes the moment you change it. 2 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 you type or drop a file, 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

Does Convert ASCII to PETSCII cost anything?

Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.

Is it safe to paste sensitive or confidential data?

No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.

How much text can I process at once?

There is no fixed limit. Because the work happens on your own device rather than on a shared server, the practical ceiling is your machine's memory, which comfortably handles inputs far larger than typical online tools allow.

Do I need to sign up or install anything?

Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.

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.

Related tools

All ASCII Tools