title: How does youtube encode their urls?
body: <p>Quick Question</p>
  
  <p>How does youtube encode theirs urls? take below</p>
  
  <p><a href="http://www.youtube.com/watch?v=MhWyAL2hKlk" rel="noreferrer">http://www.youtube.com/watch?v=MhWyAL2hKlk</a></p>
  
  <p>what are they doing to get the value MhWyAL2hKlk</p>
  
  <p>are they using some kind of encryption then decrypting at their end</p>
  
  <p>I want to something similar with a website i am working on below looks horrible.</p>
  
  <pre><code>http://localhost:8888/example/account_player/?playlist=drum+and+bass+music
  </code></pre>
  
  <p>i would like to encode the urls to act like youtubes dont know how they do it tho.</p>
  
  <p>Any advice</p>