Skip to main content

URL Encoder

Percent-encode text or full URLs for safe use in query strings and links.

Runs in your browser, your data never leaves your deviceFree, no sign-up
Options
Percent-encoded output

The percent-encoded text will appear here.

How it works

URL encoding (percent-encoding) replaces unsafe characters with a % followed by the character’s hexadecimal byte value. Letters, digits and a small set of unreserved characters (- _ . ~) are left as-is.

The two modes map directly to the browser’s native encodeURIComponent and encodeURI functions, so the output matches what JavaScript produces exactly, including full UTF-8 handling for non-ASCII text.

Features

  • Component and full-URL encoding modes
  • Full Unicode support via UTF-8 percent-encoding
  • Copy, download and upload actions
  • Live mode switching with instant re-encode
  • 100% client-side: nothing leaves your browser

How to use

  1. Paste the text or URL to encode.
  2. Pick a mode: Component for a single value, Full URL for a complete URL.
  3. Press Encode and copy the result.

Example

Input:  café & bar
Output: caf%C3%A9%20%26%20bar

Frequently asked questions

What is the difference between the two encoding modes?
Component mode (encodeURIComponent) encodes everything except letters, digits and - _ . ! ~ * ' ( ). Use it for a single query-string value or path segment. Full URL mode (encodeURI) keeps URL structure characters like : / ? # & = intact; use it when the input is already a complete URL and you only need its special characters (spaces, accents, etc.) escaped.
When do I need URL encoding?
Whenever text containing spaces, accents, ampersands, question marks or non-ASCII characters is placed into a URL: query-string parameters, path segments, and redirect targets. Unencoded special characters change the URL's meaning or make it invalid.
How are spaces encoded?
As %20 in this tool (and in query strings generally, per RFC 3986). You may also see + used for spaces in HTML form submissions (application/x-www-form-urlencoded), which is a form-encoding convention, not standard URL encoding.
How are Unicode characters encoded?
Each character is converted to its UTF-8 byte representation and each byte is percent-encoded, so for example é becomes %C3%A9. This is what browsers and every standard library do.
Is my text sent to a server?
No. Encoding happens entirely in your browser with JavaScript. Nothing you type is transmitted anywhere, and you can verify this in your browser's network inspector.