URL Encode / Decode
Paste any URL or text — non-ASCII characters, spaces, symbols — and get a percent-encoded result on the spot. Decode goes the other direction. Switch between encodeURIComponent and encodeURI, and the query parameter breakdown appears automatically. Nothing leaves your browser.
How to Use the URL Encode / Decode Tool
Type or paste the string or URL you want to convert into the text area above. Use the segment buttons at the top to switch between Encode and Decode modes. Results update in real time as you type.
- Encode: Converts characters that cannot appear directly in a URL — such as spaces, non-ASCII letters, and special symbols — into a format like
%E3%81%82. - Decode: Converts a percent-encoded string back into its original readable text.
- encodeURIComponent (recommended): Also encodes URL delimiter characters such as
: / ? # [ ] @ ! $ & ' ( ) * + , ; =. Use this when encoding the value of a query parameter. - encodeURI: Intended for encoding a complete URL, so it leaves URL structural characters unencoded.
Worked Example: Encoding a Search Query Value
Say you need to pass q=cafe & bar to an API. The space and the & can't go straight into a URL. Paste cafe & bar into the input and encode it (encodeURIComponent):
- Input (before):
cafe & bar - Result (after):
cafe%20%26%20bar
Append that after https://example.com/search?q= and you have a URL that's safe to send. Going the other way, paste a %-heavy URL and it's decoded automatically back to the original text.
Common Use Cases
- Encoding or decoding search queries and URLs that contain non-ASCII characters
- Building and validating query parameters for API requests
- Fixing garbled characters caused by pasting URLs into a browser address bar
- Inspecting
application/x-www-form-urlencodedform data