Home / Free tools / Text & Data / URL Encode and Decode

URL Encode and Decode

Encode or decode text for use in web addresses, in the mode you need. Paste a full link to see its host, path and query parameters. Nothing leaves your browser.

Runs in your browser. Nothing you paste or choose is uploaded or stored.

What this URL encoder and decoder does

A web address can only contain a limited set of characters. Spaces, accented letters, emoji and symbols such as ampersand or percent have to be written as a percent sign followed by two hexadecimal digits, so a space becomes %20 and the Polish letter "ż" becomes %C5%BC. This tool converts text to that form and back, in three modes, and when you decode a complete address it also splits it into its parts so you can read the query parameters one by one.

The process is called percent-encoding and is defined in RFC 3986. Every character that is not allowed is first turned into bytes using UTF-8, and each byte is written as % plus its value in hexadecimal. Letters, digits and the four characters hyphen, period, underscore and tilde are never encoded.

Which mode to use

Worked example

Load the example, the text name=Zażółć & Co/size=10%. In component mode the result is name%3DZa%C5%BC%C3%B3%C5%82%C4%87%20%26%20Co%2Fsize%3D10%25. You can see each rule at work: the equals signs became %3D, the ampersand %26, the slash %2F, the space %20, the percent sign itself %25, and each Polish letter became two bytes. In form mode the same text gives the same string except that the spaces are written as plus signs: ...Za%C5%BC%C3%B3%C5%82%C4%87+%26+Co.... In whole-address mode, https://example.com/a b?q=zażółć becomes https://example.com/a%20b?q=za%C5%BC%C3%B3%C5%82%C4%87 and the colon, slashes and question mark are untouched.

Mistakes this tool helps you avoid

Reading an address in parts

When the decoded or encoded text is a full address, the tool lists its scheme, host, path, query parameters and fragment. That makes long tracking links readable: you can see which utm_ parameters are set and which are missing. To build such links correctly from the start, use the UTM link builder; to turn a finished link into a scannable code, use the QR code generator.

Hiding data in a text-safe form for use inside a URL is the job of the Base64 tool, and the JSON formatter tidies a document before you encode it. All of them run in your browser; nothing you type is uploaded or stored. More are on the Text and data page.

Questions

What is the difference between encodeURI and encodeURIComponent?

encodeURI is for a complete address and leaves the characters that give a URL its structure alone. encodeURIComponent is for one value and also encodes slash, question mark, ampersand, equals and similar characters. This tool offers both as Whole address and Component.

Why does a space sometimes appear as + and sometimes as %20?

%20 is the standard percent-encoding of a space. The plus sign is a convention of HTML form submissions, used in query strings. Outside a query string a plus is just a plus.

What is double encoding and how do I spot it?

It happens when already encoded text is encoded again, so %20 becomes %2520. If a decoded address still contains percent sequences, it was probably encoded twice.

Does it handle non-English characters and emoji?

Yes. Characters are converted to UTF-8 bytes and each byte is written as a percent sequence, so Polish letters, Chinese characters and emoji round-trip correctly.

Why does decoding fail with a malformed sequence error?

The text contains a percent sign that is not followed by two hexadecimal digits, or a sequence of bytes that is not valid UTF-8. Fix or remove the bad part and try again.

Which characters are never encoded?

Letters A to Z and a to z, digits 0 to 9, and hyphen, period, underscore and tilde are always left alone. Component mode also leaves ! * ' ( ) as they are, matching the browser function, while form mode encodes them.

Is the text I paste uploaded?

No. Encoding and decoding run in your browser and nothing is sent or stored.

Google, Merchant Center, YouTube, LinkedIn, Indeed, Glassdoor and Shopify are trademarks of their owners. Van Born Labs is independent and not affiliated with them. Google's own help pages are the final word on its rules.