URL Encoder

Free URL encoder that percent-encodes a query value or path segment with UTF-8. Spaces become %20 and & becomes %26. Runs locally in your browser.

Everything runs in your browser. Nothing you enter is uploaded or saved.

Your result

How to use URL Encoder

  1. Type or paste the text you want to encode into the Component text box, for example a search phrase or a single parameter value, or press Open a text file to load it from a local .txt, .csv, .json, .md, .html, .xml or .log file of up to 5 MB.
  2. Keep it to one piece of the URL, such as a value after an equals sign, rather than the full address.
  3. Click Process to percent-encode the text.
  4. Check the result: spaces appear as %20, & as %26, / as %2F and non-English letters as UTF-8 byte codes.
  5. Click Copy result and paste the encoded text into your link, Download to save it as encoded.txt, or press Reset to clear the box and start again.

Supported formats and limitations

Input
Text typed or pasted into the form, or a local .txt, .csv, .json, .md, .html or .xml file
Output
Result on screen, copy to clipboard, or download as a text file
Works on
Any modern browser on Windows, macOS, Linux, Android and iOS. JavaScript must be enabled.

Important limitations

Very large inputs (over one million characters) are rejected to keep the page responsive. Unicode text is supported; visual grapheme clusters such as some emoji count as several characters.

Privacy and file processing

Everything runs in your browser. Nothing you enter is uploaded, stored or logged by this website.

About URL Encoder

A URL can only carry a limited set of characters safely. Spaces, ampersands, slashes, question marks and letters such as é or अ have to be written as percent codes before they go into a link, or the browser and server may read them the wrong way. This URL Encoder converts a piece of text into that safe form using UTF-8, so a search term, product name or campaign label can be dropped straight into a query string.

The tool encodes one URL component at a time, not a complete address. That distinction matters: if you paste a whole link, its colons, slashes and question mark are encoded too, which is correct for passing a URL as a parameter value but not for visiting it. Encoding happens in your browser with the standard encodeURIComponent rules, nothing is sent anywhere, and the result is ready to copy with one click.

Features

  • Percent-encodes text with UTF-8, so accented letters, Devanagari and emoji become valid byte sequences such as %C3%A9.
  • Uses encodeURIComponent rules: reserved characters like &, =, ?, / and # are all encoded so they cannot break a query string.
  • Encodes spaces as %20 rather than a plus sign.
  • Shows an inline error if the text contains a broken Unicode character (an unpaired surrogate) instead of producing a corrupt result.
  • Accepts long input, up to 1,000,000 characters, with a live character count, Copy result and a Download as encoded.txt.

Why use it

  • Stop links from breaking when a value contains spaces, ampersands or question marks.
  • Safely pass one URL inside another, for example as a redirect or share parameter.
  • Handle regional-language keywords and names without guessing at byte codes by hand.
  • Work privately, because the text never leaves your device.

How it works

encodeURIComponent over valid Unicode text; spaces become %20.

Examples

Accented word and ampersand

Input: café & tea

Result: caf%C3%A9%20%26%20tea
Encodes one URL component using UTF-8; not an entire URL.

Campaign phrase with symbols

Input: summer sale/50% off?

Result: summer%20sale%2F50%25%20off%3F
Encodes one URL component using UTF-8; not an entire URL.

A full URL used as a parameter value

Input: https://example.com/a b

Result: https%3A%2F%2Fexample.com%2Fa%20b
Encodes one URL component using UTF-8; not an entire URL.

URL Encoder: frequently asked questions

Should I paste my whole URL into the encoder?

Usually not. The tool encodes a single component, so the colon, slashes and question mark of a full address are converted to %3A, %2F and %3F. That is what you want when the URL is itself a parameter value, for example a redirect target, but not when you just want a working link. Encode only the parts that contain special characters, then assemble the address.

Why are spaces turned into %20 and not a plus sign?

The encoder follows the standard component encoding used by browsers, where a space is always %20. The plus sign form belongs to HTML form submissions (application/x-www-form-urlencoded), which this tool does not produce. Most servers accept %20 everywhere, so it is the safer choice for paths and query values alike.

How are Hindi, Marathi or other non-English characters handled?

Each character is first converted to its UTF-8 bytes, and every byte is written as a percent code. For example é becomes %C3%A9, and a Devanagari letter becomes three codes. This is the format modern browsers and servers expect, so the original text is restored correctly when the link is decoded on the other side.

What does the error about an unpaired Unicode surrogate mean?

It means the pasted text contains half of a character, usually because an emoji or rare symbol was cut in the middle when copying. Such text cannot be turned into valid UTF-8, so the tool stops with an inline error rather than producing a wrong result. Copy the original text again, or remove the broken character, and process it once more.

Does this tool also build UTM tracking links?

No. It only encodes one piece of text. To add utm_source, utm_medium and the other campaign tags to an address, use the UTM Builder, which handles the encoding of each tag for you and keeps your existing query parameters in place.

Is my text sent to a server?

No. Encoding runs entirely in your browser with built-in JavaScript functions, and the tool makes no network request with your input. You can even use it on sensitive values, although as with any website it is sensible to avoid pasting passwords or private keys on a page you do not trust.