ASCII 34
Quotation Mark (")
Printable ASCII
Double quote. Must be escaped in JSON strings as \". Wraps string literals in most languages.
Common uses & context
The character '"' — Quotation Mark — has ASCII code 34 (0x22), octal 0042, binary 00100010. Double quote. Must be escaped in JSON strings as \". Wraps string literals in most languages.
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 %22), or in HTML (where it is written"). Knowing its exact code point (34) helps when you filter, validate, or sanitize input byte by byte.
All encodings at a glance
| Decimal | 34 |
| Hexadecimal | 0x22 |
| Octal | 0042 |
| Binary | 00100010 |
| HTML numeric entity | " |
| HTML named entity | " |
| URL encoding | %22 |
| UTF-8 bytes | 0x22 |
Code snippets
JavaScript
String.fromCharCode(34); // """
34.toString(16); // "22"Python
chr(34) # '"'
ord(chr(34)) # 34
hex(34) # '0x22'HTML
" <!-- named entity -->
" <!-- numeric entity -->Programming notes
- ▸Code 34 (0x22); URL-encoded form%22.
- ▸In HTML write it as " (named) or " (numeric) to avoid it being parsed as markup.
- ▸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 34?
ASCII code 34 is the character '"' (Quotation Mark). In hexadecimal it is 0x22, in octal 0042, and in binary 00100010.
What is 0x22 in ASCII?
Hexadecimal 0x22 equals decimal 34, which is the character '"' (Quotation Mark). To convert hex to ASCII yourself, read the two hex digits as a base-16 number (0x22 = 34) and look up that code point.
How do I write the character with code 34 in code?
In JavaScript use String.fromCharCode(34); in Python use chr(34); in HTML use the numeric entity " or the named entity ". In a URL it is percent-encoded as %22, and in UTF-8 it is stored as the byte sequence 0x22.