Skip to content

Text to ASCII

Convert text into ASCII character codes in any base.

Character Code Note

Quick Tool Overview

Text to ASCII shows the character code behind every character in your text, in decimal, hexadecimal, octal or binary. Characters above 127 are outside strict ASCII, so those are flagged and shown as Unicode code points rather than given a number no ASCII table contains.

What it does
Converts characters into their numeric codes
You give it
Any text, from one character to a document
You get back
The codes in the base and format you choose
Best for
Debugging strings, teaching and lookup tables
Text Tools Free, unlimited use No sign-up Runs in your browser

About the Text to ASCII

Every character your keyboard produces has a number behind it. ASCII assigned those numbers in 1963 for the first 128 characters, and Unicode extended the same idea to every writing system in use. This converter shows you the number for each character in your text.

You can have the codes in decimal, hexadecimal, octal or binary, separated by spaces, commas or nothing at all, and padded to a fixed width so columns line up. Characters above 127 are outside strict ASCII, so those are flagged and shown as their Unicode code points — which is the honest answer rather than silently producing a number that no ASCII table contains.

Key features of the Text to ASCII

Four number bases

Decimal for an ASCII table, hex for code, octal for Unix escapes, binary for teaching.

Honest about non-ASCII

Characters above 127 are flagged as Unicode rather than presented as ASCII values that do not exist.

Column padding

Zero-pad the codes to a fixed width so they line up when pasted into a spreadsheet.

Any separator

Spaces, commas or nothing at all, depending on where the codes are going.

Character table view

Each character shown beside its code, which is what makes an invisible character visible.

How to use the Text to ASCII

  1. 1

    Type or paste your text

    Anything from a single character to a full document.

  2. 2

    Choose the number base

    Decimal is the usual ASCII table reading; hex is what you want for code and debugging.

  3. 3

    Set the separator and padding

    Space, comma or none, with optional zero padding so the codes line up in columns.

  4. 4

    Copy the codes

    The result is ready to paste into a spreadsheet, a script or a lookup table.

Frequently asked questions

32 in decimal, 20 in hexadecimal. It catches people out because a space looks like nothing, but it is a real character with a real code — which is exactly why counting characters with and without spaces gives two different answers.

Reviews of the Text to ASCII

What people who use the Text to ASCII think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the Text to ASCII. It takes half a minute and no account.

Write the first review

More text tools