ASCII Character: Space

ASCII Code 32 · Unicode U+0020 · Hex 0x20

About the Space Character

ASCII code 32 (0x20) represents the Space character " ". The space character (ASCII 32) is the most common character in most text. It separates words and provides visual spacing in documents. The printable ASCII characters (codes 32–126) include the space, digits, uppercase and lowercase Latin letters, and common punctuation symbols. These 95 characters form the foundation of text representation in virtually all computing systems and are universally supported across all character encodings, programming languages, and operating systems.

Encoding Details

ASCII Code 32
Hexadecimal 0x20
Octal 040
Binary 00100000
Unicode U+0020
Unicode Name SPACE
HTML Numeric  
HTML Entity  
URL Escape %20
UTF-8 (Hex) 20
Quoted-Printable

Source Code Examples

JavaScript
// Character literal
let char = ' ';
// Using char code
let char2 = String.fromCharCode(32);
// Unicode escape
let char3 = '\x20';
Python
# Character literal
char = ' '
# Using chr()
char = chr(32)
# Using ord() to get code
code = ord(' ')  # Returns 32
HTML
<!-- Direct character -->
 
<!-- HTML entity (numeric) -->
&#32;
<!-- Hex entity -->
&#x20;
C#
// Character literal
char c = ' ';
// Using cast
char c2 = (char)32;
// To get code from char
int code = (int)' ';  // Returns 32

Navigate

Copied!