 <p>Here is some code I used to this a while back, it's not perfect but it should get you started:</p> <p>EDIT: Still ugly but output is better: <code>ajax-json-html5-the-future-of-web-</code></p> <pre><code>string title = "AJAX, JSON &amp; HTML5! The future of web?"; title = Regex.Replace(title, @"&amp;amp;|&amp;", "-"); StringBuilder builder = new StringBuilder(); for (int i = 0; i &lt; title.Length; i++) { if (char.IsLetter(title[i]) || char.IsDigit(title[i])) builder.Append(title[i]); else builder.Append('-'); } string result = builder.ToString().ToLower(); result = Regex.Replace(result, "-+", "-"); </code></pre>