Skip to content
FiftyCalc Free calculators for all 50 states

URL Encoder

Test cases replayed : 2 of 2 match · Methodology · No outside source listed

Percent-encode text so it can be used safely in a URL or query string.

Result

Sample figures

Result—

Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.

URL Encoder

Text: type or paste your values. Prefilled example: price=10 & name=Ann Lee.

How to use this calculator

Fill in the fields in this order; each step takes you to its field.

  1. Text: type or paste your values.
  2. Read the result: Result.

How this calculator works

Characters other than letters, digits and - _ . ! ~ * ( ) and the apostrophe are replaced by % and their UTF-8 bytes in hex (RFC 3986), as JavaScript encodeURIComponent does.

Worked example

Textprice=10 & name=Ann Lee
Resultprice%3D10%20%26%20name%3DAnn%20Lee

Frequently asked questions

Why is a space written %20?

A space is not allowed in a URL; %20 is its encoded form.

Related calculators