🆕 Newly Added Calculators:

🔗 URL Encode / Decode

Muhammad Yasir Yasin
By Muhammad Yasir Yasin · Updated 12 Nov 2026 Founder · 20 Year+ Telecom + IT Expert
Muhammad Yasir Yasin

Muhammad Yasir Yasin

Founder, metacalculator.org

Muhammad Yasir Yasin is a Telecom + IT expert from Pakistan with 20+ years of proven experience — the career documented on his LinkedIn. He has been in pure IT since 1998, and works as a crypto consultant & trader since 2016. He is the founder of metacalculator.org, seotools.metacalculator.org (SEO Tools) and metatrendonline.com (Digital Products Market Place): free tools built to give clear, checked answers, with no sign-ups and no paywalls.

Every calculator here is built from the published formula, tested by hand, and explained in plain words.

Url Encode Decode

Result

Spaces, question marks and non-English characters are not allowed raw inside a URL — they must be percent-encoded, like %20 for a space. Choose Encode to convert text, or Decode to turn %20-style sequences back into readable characters.

The tool runs fully in your browser, so links and query strings stay private on your own device.

Why URLs need encoding at all

A URL is allowed to contain only a limited set of characters: letters, digits, and a handful of symbols. But the real world insists on putting everything into web addresses — search phrases with spaces, product names with ampersands, email addresses, prices, text in Arabic or Urdu or Chinese. URL encoding (also called percent-encoding) is the bridge: every character that is not allowed is replaced by a % followed by its two-digit hexadecimal byte value. A space becomes %20. A question mark becomes %3F. The server at the other end reverses the substitution and recovers exactly what you meant.

You meet encoded URLs constantly even if you never write one: it is the reason a Google search for "hello world?" produces an address full of % signs, and why copying a link out of a browser sometimes gives you an unreadable string of codes instead of the tidy text you typed.

How percent-encoding works

The rule is applied byte by byte. First the text is written in UTF-8, the universal character encoding. Then every byte that does not represent an allowed character is written as %XX, where XX is the byte's value in hexadecimal. Plain ASCII characters that are safe pass through untouched, which is why encoded text stays mostly readable: "hello world?" becomes hello%20world%3F — only the space and the question mark needed encoding.

This tool's Encode mode follows the behaviour of JavaScript's standard encodeURIComponent function, the same one browsers themselves use. That function leaves these characters unescaped: **A–Z, a–z, 0–9, and − _ . ! ~ * ' ( )**. Everything else — spaces, &, =, +, #, /, :, @, %, and all non-ASCII text — is percent-encoded. A non-ASCII character takes as many %XX groups as it has UTF-8 bytes: two for most accented European letters, three for Arabic, Urdu and Chinese characters, four for emoji.

Worked example — the tool's own default

The tool opens with the text hello world? in Encode mode. Clicking Calculate gives:

hello%20world%3F

  • "hello" passes through (letters are safe).
  • The space becomes %20.
  • "world" passes through.
  • The "?" becomes %3F — a literal question mark cannot appear inside a query value because ? is the character that starts the query string in a URL, so it must be disguised.

Switch to Decode mode, paste hello%20world%3F, and Calculate returns hello world? — the exact original.

Reference table — the characters people encode most

CharacterEncodedWhy it must be encoded
space%20spaces are not allowed in URLs
?%3Fstarts the query string
&%26separates parameters in a query
=%3Dseparates a parameter's name from its value
#%23starts the fragment (anchor)
/%2Fseparates path segments
+%2Ba literal plus; in form data a bare + means a space
%%25the escape character itself
@%40reserved (userinfo/host separator)
:%3Areserved (scheme/port separator)

Worked rows from this table: "tom & jerry" encodes to tom%20%26%20jerry; "50% off" encodes to 50%25%20off (note the % itself becoming %25); "price=100&tax=5" encodes to price%3D100%26tax%3D5; an email address, "[email protected]", becomes user%40example.com.

Decoding a real shared link

Here is the everyday job this tool does best. A link arrives looking like this in a document: …/search?q=caf%C3%A9%20menu&lang=en. The value after q= is caf%C3%A9%20menu. Paste it into Decode mode: %20 becomes a space, and %C3%A9 is a two-byte UTF-8 sequence — one character spread over two % groups — which decodes to é. The result is café menu, the search the sender actually ran. Two lessons hide in that small example: decode only the component you need (the q value), not the whole address; and never split a string in the middle of a %XX run when copying it, because half a character is an error, as the FAQ explains.

Encode a component, or a whole URL?

A distinction that causes real bugs: encoding a component (one query value, one path segment) versus encoding a whole URL. This tool encodes a component — the safe choice when you have a piece of user text (a search phrase, a filename, a redirect target) that must travel inside a URL without its & or = characters being mistaken for structure. If you paste an entire finished URL into a component encoder, the :, / and ? that give the URL its structure will be encoded too, producing a string that no longer works as an address — that is the tool doing exactly what it was asked, to the whole input. Encode the value, then assemble the URL.

The plus-sign trap

In one specific place — form data sent as application/x-www-form-urlencoded, the classic query-string format — a space may be written as + instead of %20. This is why a copied search URL sometimes shows "hello+world". Strict percent-encoding (and this tool) writes spaces as %20 and treats a + as a literal plus, encoding it as %2B. If you decode a form-style string and the spaces come back as plus signs, the string was form-encoded; replace + with a space before decoding.

Common mistakes

  • Double-encoding. Encoding an already-encoded string turns %20 into %2520 (the % gets encoded). If a decode leaves % signs everywhere, the input was encoded twice — decode it twice.
  • Encoding the whole URL. See above: encode values, not finished addresses.
  • Assuming encoding is security. Like Base64, percent-encoding is a transport format. %70%61%73%73 is just "pass" in disguise and fools nobody.
  • Forgetting that decoded text is untrusted. A decoded parameter can contain script or path traversal (../). Developers must validate after decoding; this tool simply performs the mechanical reversal.
  • Breaking UTF-8 pairs. A %XX group is one byte, not one character. Splitting a multi-byte character in the middle produces invalid text and this decoder will report an error rather than guess.

Is my text uploaded anywhere?

No. The encoding and decoding run in your browser with JavaScript. Nothing is sent to a server, so the tool is safe for the realistic use case — untangling a messy shared link or preparing a query value — without your text leaving the machine.

Related tools

If your string is a block of letters and digits ending in = padding, it is not URL encoding at all — it is Base64, and the Base64 Encode / Decode tool is the one you want. For numeric conversions of every other kind, see the general Conversion Calculator.

Frequently asked questions

What does this URL tool do?

It percent-encodes text so it can travel safely inside a URL (Encode mode), and reverses percent-encoding back to readable text (Decode mode). Paste your text, pick the mode and click Calculate. Everything happens in your browser; nothing is uploaded.

What is "hello world?" URL-encoded?

hello%20world%3F — the space becomes %20 and the question mark becomes %3F, while the letters pass through unchanged. That is the tool's default example.

When would I need URL encoding?

Whenever text must be placed inside a web address: a search phrase with spaces as a query parameter, a filename containing & or #, a redirect link carrying another link inside it, or text in a non-English script. Browsers and servers also do it automatically behind the scenes, which is why shared links often arrive full of % codes that this tool's Decode mode makes readable again.

Why does my whole URL stop working after I encode it?

Because you encoded the structure along with the text. The :, / and ? characters that make a URL work were converted to %3A, %2F and %3F. Encode only the individual value (the search phrase, filename or parameter), then assemble the finished URL around it.

What is the difference between %20 and + for a space?

Both can mean a space, but in different formats. Strict percent-encoding — used by this tool — writes a space as %20 and a literal plus sign as %2B. The + for space convention belongs to form data (application/x-www-form-urlencoded), which is why some copied search URLs show hello+world. If decoding leaves plus signs where spaces should be, the string was form-encoded.

Why does decoding give an error?

The decoder reports "That does not look like a valid encoded URL" when the input contains a broken percent sequence — a % that is not followed by two hexadecimal digits, or a truncated multi-byte character (for example a string cut off in the middle of a %E2%82 sequence). Check that the full string was copied, including its ending.

Which characters never need to be encoded?

Letters (A–Z, a–z), digits (0–9) and four unreserved marks — hyphen, underscore, full stop and tilde (- _ . ~) — are always safe in a URL and never need encoding. Everything else, including spaces, accented letters, currency symbols and most punctuation, should be percent-encoded when it appears in a URL.