ASCII 58
Colon (:)
Printable ASCII
Colon. Key-value separator in JSON, YAML, and CSS. URL scheme separator (https:).
Common uses & context
The character ':' — Colon — has ASCII code 58 (0x3A), octal 0072, binary 00111010. Colon. Key-value separator in JSON, YAML, and CSS. URL scheme separator (https:).
Punctuation and symbol codes carry the most syntactic weight per byte in programming: a single ':' can change how a parser reads an entire expression. When ':' needs to appear as literal data rather than syntax, you often have to escape it — in string literals, in regular expressions, in URLs (where it becomes %3A), or in HTML. Knowing its exact code point (58) helps when you filter, validate, or sanitize input byte by byte.
All encodings at a glance
| Decimal | 58 |
| Hexadecimal | 0x3A |
| Octal | 0072 |
| Binary | 00111010 |
| HTML numeric entity | : |
| URL encoding | %3A |
| UTF-8 bytes | 0x3A |
Code snippets
JavaScript
String.fromCharCode(58); // ":"
58.toString(16); // "3a"Python
chr(58) # ':'
ord(chr(58)) # 58
hex(58) # '0x3a'HTML
: <!-- numeric entity (no named entity for this character) -->Programming notes
- ▸Code 58 (0x3A); URL-encoded form%3A.
- ▸In HTML the numeric entity is :.
- ▸When used as literal data in regex or strings, ':' usually needs escaping — check the rules for your language.
Frequently asked questions
What character is ASCII code 58?
ASCII code 58 is the character ':' (Colon). In hexadecimal it is 0x3A, in octal 0072, and in binary 00111010.
What is 0x3A in ASCII?
Hexadecimal 0x3A equals decimal 58, which is the character ':' (Colon). To convert hex to ASCII yourself, read the two hex digits as a base-16 number (0x3A = 58) and look up that code point.
How do I write the character with code 58 in code?
In JavaScript use String.fromCharCode(58); in Python use chr(58); in HTML use the numeric entity :. In a URL it is percent-encoded as %3A, and in UTF-8 it is stored as the byte sequence 0x3A.