Skip to content
UniKit

String to ASCII codes

Convert text into per-character ASCII codes in decimal, hex or binary, with Unicode code points and a separate count for non-ASCII characters.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

ASCII codes

Code points only: ASCII covers 0–127, CJK characters are reported as Unicode code points.

Enter text to see its per-character codes

What this tool does

  • Turn pasted text into per-character ASCII codes in decimal, hex or binary for protocol work and test fixtures.
  • Prepare one-code-per-character lists where CJK characters are reported as Unicode code points and counted separately.
  • Flatten the whole input into a single line or emit one character per line so the result can be pasted into code or spreadsheets.

Example

Input

Hi
A

Output

72 105
65

Defaults are decimal plus one code line per text line: H=72, i=105 and A=65 on the second line.

Frequently asked questions

Can CJK text be converted into ASCII codes?

No. ASCII only has code points 0–127; characters above that are reported as their Unicode code point (中 is 20013) and counted in the non-ASCII statistic. On the wire they are further split into UTF-8 or GBK bytes.

Are line breaks encoded too?

In the default per-line layout they are consumed as row separators. In the flatten layout a line break becomes character code 10 (0A in hex); CRLF and CR are normalised to LF first.

Why are hex codes sometimes 2 and sometimes 4 digits?

For alignment: code points up to 255 are padded to 2 digits (48), other BMP characters to 4 (4E2D) and supplementary characters to 6. Binary is padded to 8, 16 or 24 bits for the same reason.

Is my text uploaded anywhere?

No. The conversion is plain string arithmetic in the page: no network request, no local storage write, nothing survives a page reload.

Keywords:string to asciiascii codeschar codes

Related tools