EditSafely

Convert ASCII to PETSCII

Map ASCII characters to Commodore PETSCII codes.

Runs on your device, nothing uploaded

Character set
Separator
Try:

0 chars · 0 lines

Output

Map ASCII characters to Commodore PETSCII codes.

Type or paste above to see the result here.

Example: Letter

What you paste never leaves this tab

Convert ASCII to PETSCII 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 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. A C64 starts in the Upper case & graphics set, where A is 65 and there is no lower case. After Shift + C= it switches to Lower & upper case, where a is 65 and A is 193. Pick the set your program uses; the PETSCII table on this site uses the same choice.
  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

65

Word

Input

HELLO

Output

72 69 76 76 79

Lower & upper case set

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 3 settings, including Character set, Line breaks as RETURN (13) 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

Does Convert ASCII to PETSCII cost anything?

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?

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; 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?

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 →