Advertisements

headerup to 320x100 / 728x90

Character to ASCII Code

Convert each character in a string to its ASCII / Unicode code point

Input
Loading editor...
Output

Output will appear here...

Advertisements

content bottomup to 300x250

What is Character to ASCII Code

Last reviewed:

ASCII (American Standard Code for Information Interchange) is a 7-bit character encoding that defines 128 characters, forming the historical basis for most modern encodings.

Character to ASCII converts every character in your text to its decimal code point using JavaScript's native String.codePointAt. Printable characters return the classic 0–127 ASCII range, while emoji and CJK glyphs return their multi-byte Unicode code points.

This is the workhorse tool for low-level debugging, protocol design, key-derivation checks, and any task where you need to see the underlying numeric representation of a string.

Why use it

  • Inspect hidden whitespace or invisible Unicode characters.
  • Debug payloads where an extra newline or non-breaking space is causing failures.
  • Verify curriculum material explaining ASCII and Unicode.
  • Build fixtures for cryptography or parsing unit tests.
  • Confirm that a string contains only printable ASCII before sending it to legacy systems.

Features

  • Uses Unicode-aware String.codePointAt
  • Returns space-separated decimal code points
  • Handles emoji and CJK characters correctly
  • Ideal for debugging invisible characters
  • Zero-upload Character to ASCII Code pipeline, nothing touches a server

How to use Character to ASCII Code

  1. Paste text. Drop any string into the input area.
  2. Click Run. Each character is converted to a decimal code point.
  3. Copy list. Use the space-separated list in your test fixture or debugger.

Example (before/after)

Characters

Hi!

Code points

72 105 33

Common errors

Emoji returns a large number

Emoji are multi-byte Unicode characters, not ASCII.

Fix: Use the ASCII to Byte tool if you only need 0–255 values.

Expected hex output

This tool returns decimal.

Fix: Use the Text to Hex tool if you need hexadecimal character codes.

FAQ

Is the output decimal or hex?

Decimal. Use Text to Hex for base-16.

How are surrogate pairs handled?

The tool uses codePointAt, so emoji return a single code point (not two surrogates).

Does it handle newlines?

Yes — newlines return 10 (LF) or 13 (CR).

Can I paste a long document?

Yes, though very long strings may be slow in older browsers.

Is input stored anywhere?

No. All processing happens in your browser.