What are the safe characters for making URLs?

I am making a website with articles, and I need the articles to have “friendly” URLs, based on the title.

For example, if the title of my article is "Article Test", I would like the URL to be http://www.example.com/articles/article_test.

However, article titles (as any string) can contain multiple special characters that would not be possible to put literally in my URL. For instance, I know that ? or # need to be replaced, but I don’t know all the others.

What characters are permissible in URLs? What is safe to keep?

13 Answers
13

Leave a Comment