Skip to tool

Python ord() Online

Read first character code point.

The output updates as you type. The tool processes input in your browser.

Worked example

Use a non-ASCII character to see why the byte, UTF-16 code unit, and Unicode code point can differ.

Sample input
A
Sample output
65

Using this operation in Python

The interactive result uses JavaScript. Python str stores Unicode text. Encode to bytes when an API expects UTF-8 or another byte representation.

Python reference