What is URL encoding and why is it needed?
URL encoding (percent-encoding) converts characters into a format that can be safely transmitted over the internet. Special characters like spaces, symbols, and international characters are replaced with a percent sign (%) followed by two hexadecimal digits. This is necessary because URLs can only contain certain characters from the ASCII set. For example, a space becomes %20, and an @ symbol becomes %40.