Escape Text
Escape a string for JSON, JavaScript, SQL, shell or regex.
Convert text into ASCII character codes in any base.
| Character | Code | Note |
|---|
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.
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.
Decimal for an ASCII table, hex for code, octal for Unix escapes, binary for teaching.
Characters above 127 are flagged as Unicode rather than presented as ASCII values that do not exist.
Zero-pad the codes to a fixed width so they line up when pasted into a spreadsheet.
Spaces, commas or nothing at all, depending on where the codes are going.
Each character shown beside its code, which is what makes an invisible character visible.
Anything from a single character to a full document.
Decimal is the usual ASCII table reading; hex is what you want for code and debugging.
Space, comma or none, with optional zero padding so the codes line up in columns.
The result is ready to paste into a spreadsheet, a script or a lookup table.
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.
They are above 127 and therefore outside strict ASCII. The tool shows their Unicode code point and flags them, rather than pretending an ASCII value exists for them.
ASCII defines 128 characters, numbered 0 to 127. Unicode is a superset that keeps those same values for the first 128 and adds well over a hundred thousand more, so every ASCII code is also a valid Unicode code point.
Debugging, mostly. When a string is behaving oddly, looking at the codes shows you the invisible character, the tab that should have been a space, or the curly quote that should have been straight.
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.
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 reviewEscape a string for JSON, JavaScript, SQL, shell or regex.
Number every line, with padding, a custom start and any separator.
Score your text against every major readability formula at once.
Decode Base64 back to text, including JWT payloads.
Count how many distinct words a text uses and how varied it is.
Replace every match in a block of text, with regex when you need it.
Generate available-looking usernames from word patterns.
Strip emoji and their invisible joiners out of any text.