All Tools View Categories About Contact Privacy

Convert ASCII to PETSCII

Browser-side ASCII conversion with validation, sample data, Copy, Download, and Clear.

Your input is processed locally in the browser.
ASCII text → hexadecimal byte output

About Convert ASCII to PETSCII

Convert ASCII to PETSCII This tool uses a defined Commodore PETSCII lowercase/text-mode mapping, so the result is deterministic rather than an unspecified mixture of PETSCII screen codes and character-set variants.

Use it for retro-computing exercises, emulator fixtures, and byte-level examples where Commodore-style text encoding is expected.

Start with the built-in sample, then replace it with a short test value containing a space, punctuation, and a character whose code you already know. This gives you a quick sanity check before using a longer string.

PETSCII is not fully compatible with ASCII and Commodore machines have multiple character sets. This tool is intentionally a text-mode mapping and does not claim to reproduce screen RAM codes.

Compare a few letters and the hex bytes with a PETSCII reference before using the data on real hardware. The result stays in the browser until you explicitly copy or download it.

This tool does not require an account, upload service, or external API. That makes it suitable for development checks, retro-computing exercises, documentation examples, and small repeatable test fixtures.

PETSCII is not one simple ASCII replacement table. Commodore systems used different character-set modes, and screen memory codes are a separate representation from the character codes used by BASIC and stored text. This tool therefore chooses a defined lowercase/text-mode mapping and outputs the byte values as hexadecimal so you know exactly which layer you are working with.

Case is the detail that surprises users most often. In the selected mode, an ASCII lowercase letter and an ASCII uppercase letter do not simply stay in the familiar ASCII positions. That is why the mapping table is more useful than treating PETSCII as “ASCII plus graphics.” When preparing a Commodore fixture, inspect at least one uppercase and one lowercase letter before converting the complete string.

Another practical distinction is screen display. A byte that represents a character in PETSCII is not automatically the same byte you would poke into screen RAM to produce a visible glyph. If your target is an emulator test, saved text, or BASIC string, this character-oriented converter is appropriate. If your target is a screen-memory dump, use a screen-code representation instead.

Use the tool for short labels and messages first. The hex output is deliberately easy to paste into documentation or compare with a reference chart. Once a short sample matches, the same mapping can be applied consistently to larger test fixtures. Unsupported or ambiguous cases are better treated as errors than silently rewritten, because retro-computing data often depends on exact byte values.

When targeting real Commodore software, the safest workflow is to identify whether the destination expects PETSCII character bytes, screen codes, or another file format before copying the output. This converter intentionally stops at character-byte mapping. Keeping the conversion layer separate from file packaging makes it much easier to inspect and troubleshoot the resulting data.

Features

  • Uses an explicit PETSCII text-mode mapping.
  • Outputs hexadecimal bytes.
  • Rejects non-ASCII input.
  • Preserves character order.
  • Makes case mapping visible.
  • Runs locally.
  • Includes sample data.
  • Supports clear/copy/download.
  • Avoids screen-code confusion.
  • Suitable for fixtures.

How to Use

  1. Load sample.
  2. Run conversion.
  3. Inspect PETSCII hex output.
  4. Check letter case mapping.
  5. Compare with a known PETSCII table.
  6. Copy/download.
  7. Clear before another test.

Examples

A. Uppercase A maps to PETSCII C1 in the selected text mode.

a. Lowercase a maps to PETSCII 41.

Space. 20 remains space.

Numbers. Common printable numbers remain in the shared range.

Fixture. Convert a short Commodore label for emulator testing.

Benefits

  • Makes PETSCII mode explicit.
  • Useful for emulator tests.
  • Hex output is easy to verify.
  • Avoids screen-code assumptions.
  • Local processing.
  • Repeatable fixtures.
  • Clear semantics.

Frequently Asked Questions

Which PETSCII mode is used?
A lowercase/text-mode mapping is used.
Is PETSCII identical to ASCII?
No.
Are screen codes included?
No.
Can I enter Unicode?
No, the source is standard ASCII.
What format is output?
Hexadecimal byte values.
Does input upload?
No.
Can I copy?
Yes.
Can I download?
Yes.
Why does uppercase map differently?
PETSCII text mode uses different code positions for case.
Can I use this as screen RAM data?
No.