Free Online Tool

URL Encoder / Decoder

Free online URL encoder and decoder for percent encoding. Use it to encode url text and decode url strings in both directions, with encodeURI and encodeURIComponent modes, full UTF-8 support, and live preview. A fast urldecoder and url encode tool that is RFC 3986 compliant, private, and no signup.

★★★★★4.9, used by developers and QA engineers
Plain URL/text
URL-encoded

RFC-compliant URL encoding

Two modes for two use cases.

Two encoding styles

encodeURIComponent for parameters, encodeURI for full URLs.

UTF-8 support

Correctly handles emoji, accents, CJK, and all Unicode.

Encode and decode

Switch with one click. Live conversion.

Error handling

Clear messages for malformed encoded input.

100% private

Encoding happens entirely in your browser.

RFC 3986 compliant

Uses browser-native percent encoding per the URL spec.

Who uses URL encoding?

Anyone building or debugging URLs.

For developers

Build query strings, encode API parameters, sanitise URL paths.

For SEO writers

Decode URLs from analytics to read query parameters in human form.

For QA testers

Inspect URL-encoded test payloads, verify percent encoding correctness.

For marketers

Build tracking URLs with UTM parameters that include special characters.

For backend developers

Encode redirect URLs in OAuth flows and webhook callbacks.

For data analysts

Decode URL-encoded log entries to extract parameter values.

About URL encoding

What percent encoding does and when to use which mode.

What URL encoding does

URL encoding (also called percent encoding) converts characters with special URL meaning into a percent-prefixed hex format. Space becomes %20, question mark becomes %3F, ampersand becomes %26. Encoding is required by RFC 3986 because raw special characters change URL structure. A query parameter containing & without encoding would terminate the URL early. This URL encoder and decoder handles the conversion in both directions, so a single tool covers every percent encoding task.

What is percent encoding

Percent encoding is the formal name for the %XX scheme behind URL encoding. Each escaped character is written as a percent sign followed by the two-digit hexadecimal value of its byte. The capital letter A, for example, has the byte value 0x41, so a strict encoder could write it as %41, although unreserved characters like letters and digits are normally left as-is. URLs only allow a limited set of safe characters, so percent encoding is how every other character (spaces, punctuation, accented letters) gets carried in a link without breaking it. Understanding the %XX mechanism makes both encoding and decoding far easier to reason about.

How to URL decode online

To URL decode online, switch the tool to Decode mode and paste your encoded link. The decoded text appears live, turning %20 back into a space, %3F back into a question mark, and %26 back into an ampersand. URL decoding is the fastest way to read a link from a log file, an analytics report, or a redirect chain in human-readable form. Because the tool runs in your browser, you can decode url strings and decode link values instantly without sending anything to a server.

How to decode a link

Decoding a link is the same operation as URL decoding, just framed around a real-world need: you have a long, percent-encoded URL and you want to see where it actually points. Tracking links, email redirects, and OAuth callback URLs often wrap a second URL inside a parameter, so the raw string is full of %2F, %3A, and %3D. Paste the whole link into Decode mode and the readable destination appears at once. If the result still contains percent codes, the link was encoded more than once, so decode it again until it stops changing.

How to encode a URL

To encode url text, keep the tool in Encode mode and paste the value you want to make URL-safe. The percent-encoded result updates as you type, ready to copy into a query string or path segment. Choose encodeURIComponent for a single parameter value or encodeURI for a whole URL. This is the reliable way to encode a URL before adding it to a link, a form submission, or an API request.

encodeURIComponent vs encodeURI

JavaScript provides two encoding functions. encodeURI encodes a complete URL but leaves reserved characters (/, ?, &, =, #) intact because they have URL structural meaning. encodeURIComponent encodes everything except a few unreserved characters, making it safe for use as a single URL component value. Use encodeURIComponent for query parameter values. Use encodeURI for entire URLs you want to preserve structurally.

Reserved vs unreserved characters

RFC 3986 splits URL characters into two groups that decide what gets escaped. Unreserved characters (A-Z, a-z, 0-9, and the symbols - . _ ~) are always safe and never need encoding. Reserved characters such as : / ? # [ ] @ ! $ & ' ( ) * + , ; = carry structural meaning, so they must be encoded whenever they appear inside a value rather than as a separator. This is exactly why encodeURIComponent escapes more characters than encodeURI: a parameter value should never be allowed to act like a delimiter. Knowing which group a character belongs to tells you instantly whether it will change in the encoded output.

Encode a URI component for query parameters

When you need to encode a URI component, the value goes inside a query string such as ?redirect=VALUE or ?q=VALUE. encodeURIComponent escapes the reserved characters &, =, ?, /, and # that would otherwise break the parameter. This matters most for redirect URLs in OAuth flows, search terms with spaces, and any parameter that itself contains a full URL. Pick the encodeURIComponent mode in this tool to get exactly that behavior.

URL encoding in JavaScript and Python

To encode a URL in JavaScript, call encodeURIComponent() for parameter values or encodeURI() for full URLs, and use the matching decodeURIComponent() and decodeURI() to reverse them. In Python, the urllib.parse module provides quote() and quote_plus() for encoding and unquote() for decoding. This online URL encoder is handy for confirming what your code produces or for decoding a link without opening an interpreter.

How to encode url in JavaScript correctly

The most common JavaScript mistake is using encodeURIComponent on a whole URL or encodeURI on a single parameter. To encode url values in JavaScript safely, build the URL structure yourself and run encodeURIComponent only on each dynamic value before inserting it. The modern alternative is the URL and URLSearchParams classes, which apply the correct encoding automatically as you append parameters. When your code and this tool produce different output, the mismatch is almost always the wrong function choice, and pasting the same value here in encodeURIComponent mode confirms what the value should look like.

UTF-8 byte encoding

Non-ASCII characters get UTF-8 encoded first, then each byte gets percent-encoded. The euro sign € is three bytes in UTF-8 (0xE2, 0x82, 0xAC), so URL encoding produces %E2%82%AC. Emoji can be four bytes per character. Browsers and servers expect UTF-8 percent encoding by default in modern URLs.

Why URL decoding sometimes fails

A decode error usually means the input is not valid percent encoding. A lone % sign that is not followed by two hex digits, like %2 or a stray %, will throw a malformed URI error. Mixed encodings are another trap: a string encoded twice needs to be decoded twice to fully recover. If a value uses + for space (the older form data convention), decode it and then replace + manually, since strict URL decoding leaves + untouched.

URL encoding vs HTML encoding vs Base64

URL encoding makes characters safe for URLs (using %XX). HTML encoding makes characters safe for HTML markup (using &XX;). Base64 represents binary as ASCII text. Each has a specific purpose and different syntax. Picking the wrong one will silently corrupt your data in production.

Why use an online URL encoder and decoder

An online URL encoder and decoder is the quickest way to handle one-off encoding tasks without writing code or opening a terminal. It is also a reliable cross-check: when a request behaves unexpectedly, pasting the URL here shows immediately whether the problem is bad encoding. Because this url encode tool runs entirely in your browser, links containing tokens, session IDs, or internal parameters never leave your device. For inspecting analytics URLs, debugging redirects, and confirming what your code produces, a browser-based urldecoder is faster than any local script.

How to URL encode and decode

Four steps.

01

Pick mode

Encode or decode.

02

Choose style

encodeURIComponent or encodeURI.

03

Paste URL

Plain URL or encoded string.

04

Copy result

Live output.

Frequently asked questions

If you don't find your question here, ask us directly.

URL encoding (also called percent encoding) converts characters that have special meaning in URLs into a percent-prefixed hex format. The space becomes %20, the question mark becomes %3F, the ampersand becomes %26. URL encoding is required by RFC 3986 to ensure URLs are transmitted reliably across the web.

Any time you put non-alphanumeric characters into a URL. Query strings (?q=hello+world), path segments (/categories/electronics+gadgets), form data submissions, and OAuth signatures all need URL encoding. Without it, characters like &, =, and ? change the URL structure and break the request.

encodeURI encodes a full URL but leaves reserved characters like /, ?, &, = intact because they have URL structural meaning. encodeURIComponent encodes everything except a few unreserved characters, making it safe for use as a single URL component (like a query parameter value). Use encodeURIComponent for parameters, encodeURI for whole URLs.

URL encoding makes characters safe for URLs (using %XX format). HTML entity encoding makes characters safe for HTML markup (using & format). Base64 encoding represents binary data as ASCII text. Each has a specific purpose and uses different syntax. Pick the right one for your context.

In ASCII, the space character has the hex code 0x20 (decimal 32). URL encoding uses the format %XX where XX is the hex code of the character. So %20 is the URL-encoded form of a space. Some legacy systems use + for space in query strings (still common), but %20 works everywhere.

Yes, switch to Decode mode. The tool will convert %20 back to space, %3F back to ?, and so on. URL decoding is useful for understanding what a URL contains, debugging API requests, or extracting parameters from logs.

Characters outside ASCII (accented letters, CJK, emoji) get UTF-8 encoded into multiple bytes, then each byte gets percent-encoded. The euro sign € becomes %E2%82%AC because it is three bytes in UTF-8. Our tool handles UTF-8 correctly via JavaScript built-in functions.

Yes. The URL encoder runs entirely in your browser. Your URLs and parameters never get sent to any server. Encoding uses the built-in encodeURIComponent and decodeURIComponent functions, which are 100 percent client-side.

Switch the tool to Decode mode and paste your encoded link. The decoded result appears live and can be copied with one click. This URL encoder and decoder is free, needs no signup, and processes everything locally in your browser.

Keep the tool in Encode mode and paste the text you want to make URL-safe. The percent-encoded output updates as you type. Choose encodeURIComponent for a single query parameter value or encodeURI for a complete URL.

Use encodeURIComponent() for query parameter values and encodeURI() for full URLs, then decodeURIComponent() and decodeURI() to reverse them. encodeURIComponent escapes reserved characters like &, =, and ? that would otherwise break a parameter. This online tool mirrors that behavior so you can verify the output of your code.

A URI component is a single value placed inside a URL, such as a query parameter after ?q= or a redirect target after ?redirect=. Use the encodeURIComponent mode to escape every reserved character so the value cannot break the surrounding URL. This is essential when the parameter itself contains a full URL.

The Python urllib.parse module provides quote() and quote_plus() for encoding and unquote() for decoding. quote_plus() encodes spaces as + for form data, while quote() encodes them as %20. You can paste the result into this tool to confirm it matches the encoding you expect.

A malformed URI error means the input is not valid percent encoding, usually a lone % that is not followed by two hex digits. A double-encoded string needs to be decoded twice to fully recover. If a value uses + for spaces, decode it first and then replace the + characters, since strict URL decoding leaves + untouched.

Percent encoding is the formal name for the %XX scheme that URL encoding uses. Each escaped character is written as a percent sign followed by the two-digit hexadecimal value of its byte, so a space becomes %20. URLs only allow a limited set of safe characters, and percent encoding is how every other character is carried in a link without breaking it.

Paste the full link into Decode mode and the readable destination appears instantly, with percent codes like %2F and %3A turned back into / and :. This is useful for tracking links, email redirects, and OAuth callbacks that wrap a second URL inside a parameter. If the result still contains percent codes, the link was encoded more than once, so decode it again until it stops changing.

Unreserved characters (A-Z, a-z, 0-9 and - . _ ~) are always safe in a URL and never need encoding. Reserved characters such as : / ? # & = + carry structural meaning and must be encoded when they appear inside a value rather than as a separator. This is why encodeURIComponent escapes more characters than encodeURI.

Build the URL structure yourself and run encodeURIComponent only on each dynamic value before inserting it, rather than running it on the whole URL. The modern alternative is the URL and URLSearchParams classes, which apply the correct encoding automatically. If your code and this tool disagree, the cause is almost always the wrong function choice.

Yes. This URL encoder and decoder is completely free, needs no signup, and has no usage limits. Every encode and decode runs locally in your browser, so links containing tokens or session IDs never leave your device. You can use it as often as you need for both directions.

Yes. Paste a percent-encoded URL from an analytics report or log file into Decode mode and the readable parameters appear at once. As an online urldecoder it handles UTF-8, so accented characters and emoji in parameter values come back correctly. It is a fast way to read UTM parameters and redirect targets in human form.

Try our other free tools

Word counter, character counter, case converter, and 47 more.