RunToolRunRunToolRun
Tools/Code & Developer/URL Encoder

URL Encoder

Encode or decode URLs.

100% on device ยท 0 uploads
๐ŸŽ This runs 100% locally in your browser; secret API keys or parameters you enter are never sent to the internet. Completely free and secure!
01 ยท Unlimited
Use it as many times as you want โ€” completely free.
02 ยท Private
Your files never leave your device; everything runs in your browser.
03 ยท Fast
Processing happens locally and finishes in seconds.

How to URL-Encode and Decode

1

Paste text or a URL

Enter a string with spaces or special characters, or an encoded URL to decode.

2

Encode or decode instantly

Percent-encoding is applied or reversed in your browser.

3

Copy the safe result

Use the output in links, query parameters and API calls.

Why URLs need encoding at all

A URL may only contain a limited set of characters, and several of them have structural meaning: `?` starts the query, `&` separates parameters, `#` starts the fragment, `/` separates path segments. A value containing any of these would be misread as structure rather than data.

Percent-encoding solves this by replacing a character with `%` and its byte value in hexadecimal. A space becomes `%20`, an ampersand `%26`. The URL stays parseable and the value survives intact.

Encoding a whole URL or a single value

These are different operations and using the wrong one is the most common mistake here. Encoding a complete URL must leave the structural characters alone, or the address stops working. Encoding a single parameter value must encode everything, including those characters, or the value breaks the URL it is placed into.

The rule follows from what you have: if you are handling a value that will go into a parameter, encode everything. If you are handling an assembled address, encode only what is unsafe. Encode the parts, then assemble โ€” never assemble, then encode.

Double encoding

Encoding an already-encoded string turns `%20` into `%2520`, because the percent sign itself gets encoded. The result usually still works as a URL and delivers the wrong value, which makes this a bug that reaches production more often than it should.

The signature is unmistakable once you know it: `%25` appearing throughout a URL, or a parameter arriving with visible `%20` sequences in its text. Decoding twice recovers the original and confirms the diagnosis.

Spaces, plus signs and forms

A space can be `%20` or `+`, depending on context. Form submissions historically encode spaces as `+`, while the general percent-encoding rules use `%20`. Both appear in the wild, which means a decoder has to know which convention produced the string.

The practical consequence: a literal plus sign in a value must always be encoded as `%2B`. Otherwise a search for 'C++' or a phone number beginning `+90` arrives with spaces where the plus signs were.

Non-ASCII and privacy

Characters outside ASCII are encoded as their UTF-8 bytes, so a single Turkish or Cyrillic character becomes two percent-escapes and an emoji becomes four. This is why a short phrase can produce a startlingly long URL โ€” the encoding is correct, not broken.

Encoding and decoding run in your browser. URLs frequently carry session tokens, search terms and identifiers, and pasting those into a server-side tool means handing them over. Nothing is transmitted here.

Written by Mutaf โ€” Developer of RunToolRun. This section is written from the tool's own implementation.

Why Use This URL Encoder?

โœ“Encode and decode in both directions
โœ“Handles Unicode and all special characters
โœ“Great for debugging links and APIs
โœ“100% local and instant

Frequently Asked Questions

Why do URLs need encoding?+
URLs only allow a limited character set. Spaces, non-Latin letters and symbols like & or ? must become %XX sequences โ€” otherwise links break or parameters get misread.
What's the difference between %20 and + for spaces?+
%20 is the universal encoding; + means space only inside query strings, a legacy form-encoding convention. When unsure, %20 is always safe.
When do I need this tool?+
Building links with parameters by hand, debugging API calls, decoding tracking URLs to see what they contain, and fixing broken links with special characters.
Does it handle full URLs or just components?+
Both directions work on any string. Note that encoding a full URL also encodes its separators โ€” encode parameter values individually when composing URLs.

Related Tools