URL Encoder / Decoder

Ever pasted a link and watched spaces turn into %20, or wondered why a shared address broke at the first &? That is percent-encoding — the web’s way of making special characters safe inside addresses. A url encoder converts characters like spaces, question marks, and non-English letters into their %XX codes so links, query strings, and redirects work everywhere.

This free url encoder and decoder handles both directions in one click. Encode a full web address (keeping its structure intact) or a single component (encoding every reserved character), decode messy %XX strings back to readable text, and process whole lists in batch mode. Malformed codes get friendly error messages instead of silent failures. No signup, no upload — everything runs in your browser.

URL Encoder / Decoder

Percent-encode or decode web addresses and text, instantly.

CharacterEncodedCharacterEncoded
space%20?%3F
:%3A&%26
/%2F=%3D
#%23%%25
+%2B@%40

🔒 100% private — everything runs in your browser, nothing is uploaded.

How to Use the URL Encoder

  1. Pick a direction: Encode turns text into %XX codes; Decode turns codes back into readable text.
  2. Choose a scope: “Full address” keeps structural characters (: / ? & =) intact; “Component” encodes everything reserved.
  3. Paste your text and click Convert — or just type, since conversion runs live.
  4. Tick batch mode to encode or decode a whole list, one item per line.
  5. Copy the result or hit “Swap direction” to round-trip and verify.

A url encoder is one of those tools you reach for in the middle of other work — building a link, debugging a redirect, cleaning analytics data. Whether you encode addresses daily or once in a blue moon, it is always one paste away here.

Features That Set This Tool Apart

  • Both directions: encode and decode in one place, with one-click swapping to verify round-trips.
  • Two scopes: full-address and component modes match the two real encoding jobs developers face.
  • Batch line mode: convert entire lists of addresses or parameters without pasting one by one.
  • Friendly error messages: malformed % sequences are pinpointed (“near …%2…”) instead of failing silently.
  • Live conversion: results update as you type — no submit button required.
  • Private by design: this url encoder runs 100% in your browser; addresses and tokens never leave your device.

What Percent-Encoding Actually Does

Web addresses may only contain a limited character set. Everything else — spaces, accented letters, emoji, and reserved characters used in the wrong place — must be converted to a percent sign followed by two hexadecimal digits representing the character’s byte value. A space becomes %20, an ampersand becomes %26, and “ü” becomes %C3%BC (two bytes in UTF-8).

This matters most in query strings. In ?q=hello world&lang=en, the raw space would truncate or corrupt the parameter, and a literal & inside a value would split it into two parameters. Encoding the value first — hello%20world — keeps the address parseable. That is the entire job of a url encoder: making arbitrary text safe inside addresses. The same applies to redirect targets, deep links, and any address built from user input. MDN’s documentation of encodeURIComponent is the authoritative reference for exactly which characters get encoded.

URL Encoder: Full Address vs Component

Choosing the wrong scope is the most common encoding bug. Full address mode (JavaScript’s encodeURI) encodes a complete address while leaving its structure — : / ? # & = — untouched. Use it when the whole link is already assembled and you just need stray spaces or unicode fixed.

Component mode (encodeURIComponent) encodes everything except letters, digits, and a few safe symbols — including the structural characters. Use it when building an address from parts: encode each query value separately, then join them with literal & and =. Picking the right scope is what separates a working url encoder workflow from a subtly broken one: encoding a full address in component mode double-encodes the structure (%3A%2F%2F), while encoding a value in full-address mode leaves its & unencoded and breaks the query.

Common Codes and Decoding Errors

The reference table above the fold covers the codes you will meet most: %20 (space), %3A (:), %2F (/), %3F (?), %26 (&), %3D (=), %23 (#), %25 (%), %2B (+), %40 (@). Note the + trap: in query strings a plus historically means space, but in a path it is literal — another reason to decode with the right scope.

Decoding fails when a % is not followed by two hex digits — a stray percent sign, a truncated code at the end of a string, or a code like %2G. Instead of a cryptic browser error, this url encoder shows you exactly where the bad sequence sits so you can fix the source. If you are decoding addresses copied from logs or emails, stray line breaks are the usual culprit: batch mode handles them line by line.

URL Encoding Pro Tips

Encode only the value, never the whole URL — encoding the slashes and colons of the base address will break the link. Watch out for double encoding: a literal %25 in your input means something was already encoded once, and encoding again corrupts it. Spaces in query strings are safest as %20; the plus sign only means space inside form-encoded bodies, not in paths. When debugging APIs, decode the full request URL first — most “invalid parameter” errors are just an unencoded ampersand splitting one value into two. Bookmark this tool next to your API client; you will reach for it weekly.

URL Encoding: Frequently Asked Questions

How do I encode a URL?

Paste the address into the tool above with Encode selected. Use Full address mode if the link is already assembled — it keeps structural characters like : / ? and = intact while encoding spaces and special characters. Use Component mode when encoding a single query value. Click Convert (or just type) and copy the result.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a complete address but leaves structural characters such as : / ? # and = alone, so the link still works. encodeURIComponent encodes everything reserved, including those characters — it is meant for individual components like query values that get assembled into an address later. The scope selector above maps directly to these two functions.

How do I decode a URL?

Switch to Decode mode and paste the percent-encoded text. The tool converts every valid %XX sequence back to its character — %20 to space, %26 to an ampersand, and so on. If a % sign is malformed (not followed by two hex digits), you get a friendly message pinpointing the bad spot instead of a silent failure.

What does %20 mean in a URL?

It is an encoded space. Web addresses cannot contain raw spaces, so a space becomes %20 — the percent sign plus 20, the hexadecimal code for the space character. You will also commonly see %3A for a colon, %2F for a slash, and %3F for a question mark. The reference table above lists the most frequent codes.

Is my data uploaded anywhere?

No. This url encoder runs entirely in your browser with JavaScript — addresses, tokens, and query strings are never sent to a server, stored, or logged. That makes it safe for sensitive links containing session tokens or private parameters. It works offline once the page has loaded.

Broken links are often just unencoded characters. The next time an address misbehaves — or you need to build one from messy input — run it through this url encoder, pick the right scope, and ship links that work everywhere, with complete privacy.