URI Safe Characters

Below are all of the safe ("unreserved") characters to use when constructing a URI:

  • Alpha (A-Z)
  • Numeric (0-9)
  • Hyphen (-)
  • Period (.)
  • Underscore (_)
  • Tilde (~)

From section 2.3 of RFC 3986:

Characters that are allowed in a URI, but do not have a reserved purpose, are called unreserved. These include uppercase and lowercase letters, decimal digits, hyphen, period, underscore, and tilde.

ALPHA  DIGIT  "-" / "." / "_" / "~"

Published