Degree Symbol HTML & Unicode Codes

Complete reference for web development and programming

Copy codes for HTML, Unicode, CSS, and more

Quick Copy Degree Symbols

°

Degree Symbol

U+00B0

Degree Celsius

U+2103

Degree Fahrenheit

U+2109

Prime

U+2032

HTML Entity Codes

°

Named Entity

°
°

Decimal Entity

°
°

Hexadecimal Entity

°

Unicode Information

Degree Symbol

Unicode Name: DEGREE SIGN
Unicode Code Point: U+00B0
UTF-8 Encoding: C2 B0
UTF-16 Encoding: 00B0
General Category: Symbol, Other (So)

Related Unicode Characters

DEGREE CELSIUS (U+2103)
DEGREE FAHRENHEIT (U+2109)
PRIME (U+2032)
DOUBLE PRIME (U+2033)

CSS & JavaScript Codes

CSS Content

Before/After Pseudo-elements

content: "\00B0";

Hexadecimal

content: "\B0";

JavaScript/Unicode

Unicode Escape

"\u00B0"

String.fromCharCode()

String.fromCharCode(176)

Windows Alt Codes

°

Degree Symbol

Alt + 0176

Hold Alt and type 0176 on numeric keypad

Degree Celsius

Alt + 8451

Hold Alt and type 8451 on numeric keypad

Degree Fahrenheit

Alt + 8457

Hold Alt and type 8457 on numeric keypad

Programming Languages

Python

degree = "\u00B0"
degree = chr(176)
celsius = "25\u00B0C"

JavaScript

let degree = "\u00B0"
String.fromCharCode(176)
temp = 25 + "\u00B0C"

Java

String degree = "\u00B0"
char degree = (char)176
System.out.println(25+"\u00B0C")

C/C++

char degree = '\u00B0'
char degree = 176
printf("25\u00B0C\n")

C#

string degree = "\u00B0"
char degree = (char)176
Console.WriteLine($"25\u00B0C")

PHP

$degree = "\u00B0"
$degree = chr(176)
echo "25\u00B0C"

Ruby

degree = "\u00B0"
degree = 176.chr
puts "25\u00B0C"

Swift

let degree = "\u{00B0}"
UnicodeScalar(176)
print("25\u{00B0}C")

Complete Usage Examples

HTML Examples

Temperature Display

<p>Current: 25&deg;C</p>
Displays: Current: 25°C

Angle Measurement

<span>90&deg; angle</span>
Displays: 90° angle

Input Placeholder

<input placeholder="Enter temp in &deg;C">
Input with degree symbol

CSS Examples

Temperature Label

.temp::after {
  content: "\00B0C";
}
Adds °C after temperature

Angle Symbol

.angle::before {
  content: "\00B0";
}
Adds ° before number

Fahrenheit Display

.fahrenheit::after {
  content: "\00B0F";
}
Adds °F after temperature

JavaScript Examples

Temperature String

let temp = \`25\u00B0C\`;
Template literal with degree

Dynamic Display

temp + "\u00B0" + unit
Concatenation method

From Character Code

String.fromCharCode(176)
Convert from ASCII/Unicode

Real-World Examples

Weather Widget

<div class="weather">
  H: 25&deg;C | L: 18&deg;C
</div>
Weather display

Calculator Display

angleDisplay.textContent = value + "\u00B0"
Calculator angle display

Form Validation

if (value.includes("\u00B0"))
Check for degree symbol

Best Practices & Tips

Recommended Practices

  • Use HTML entities (°) for maximum compatibility
  • Include proper charset meta tag: <meta charset="UTF-8">
  • Use CSS pseudo-elements for repeated degree symbols
  • Test across different browsers and devices
  • Use Unicode escape sequences in JavaScript strings

Common Issues

  • Avoid using asterisk (*) instead of proper degree symbol
  • Don't assume all fonts support single-character ℃ symbol
  • Avoid hardcoding degree symbols in database text
  • Don't mix different degree symbol variations
  • Avoid using images for degree symbols in text