Home/Tools/Developer Tools/URL Encoder Decoder

URL Encoder Decoder

Developer Tools

Encode and decode URLs for web development.

⚡ Instant🔒 Private, in your browser🆓 Free, no sign-up👥 For developers
Your data never leaves your browser. We do not store inputs.

What URL Encoder Decoder does

The URL Encoder Decoder percent-encodes special characters in a URL or query string so it's safe to use in a link or API call, and decodes percent-encoded URLs back into readable form. It's free and works entirely in your browser — paste a URL with spaces or symbols and get a properly encoded version instantly.

FV
Reviewed by the FreeToolsVerse team · Last updated · How we check our tools

Features and benefits

  • Three conversions in one tool: encode a value, encode a whole URL and decode
  • Handles accents, other scripts and emoji by encoding them as UTF-8 bytes
  • Reports a clear error when a percent code is broken
  • Private: the text is converted in your browser

How to use URL Encoder Decoder

  1. Paste the URL or text you want to encode, or a percent-encoded string to decode
  2. Choose Encode or Decode mode
  3. View the converted result
  4. Copy it for use in a link, API call, or query string

Who should use it

Made for developers. Typical uses:

  • Encoding a search query with spaces and special characters before appending it to a URL
  • Decoding a percent-encoded URL parameter to read its actual value
  • Preparing a redirect URL that includes another full URL as a query parameter

Example

Encoding the value "100% sure" gives 100%25%20sure, and encoding a whole address such as https://example.com/a b?q=café&x=1#top with the full-URL button gives https://example.com/a%20b?q=caf%C3%A9&x=1#top, keeping the slash, question mark, equals, ampersand and hash in place.

Limitations and accuracy

The tool uses the browser's standard encodeURIComponent, encodeURI and decodeURIComponent functions. It does not turn a plus sign into a space when decoding, which form data sometimes needs, and it cannot repair a string with a broken percent code.

Accuracy: Output is tested against known inputs. For production code, review the result and run your own tests.

Expert Tip

Encode each value separately and then join the parts with ampersands and equals signs. Encoding an entire query string as one component escapes the separators and breaks the URL.

Frequently asked questions

What characters get encoded?
Reserved and unsafe characters like spaces, &, ?, #, and non-ASCII characters are converted to their percent-encoded equivalents.
Is it free to use?
Yes, completely free.
Is my data uploaded anywhere?
No, encoding and decoding both happen locally in your browser.
What's the difference between encoding a full URL and a URL component?
Encoding a whole URL preserves characters like : and / that structure it, while encoding a single component (like a query value) escapes those characters too since it's meant to sit inside another URL.
Can it decode as well as encode?
Yes, switch modes to decode a percent-encoded string back into plain text.

URL Encoder Decoder: the complete guide

Why URLs need encoding

A URL can safely contain only a limited set of characters. Spaces, accented letters and symbols such as ampersand, question mark and hash have special meanings or are not allowed, so they are written as a percent sign followed by two hexadecimal digits that give the byte value. A space becomes %20, and the accented letter in São becomes %C3%A3 because it takes two bytes in UTF-8. The URL Encoder Decoder converts in both directions.

Three buttons, three jobs

The tool offers the three conversions web developers use every day.

  • Encode uses encodeURIComponent. It escapes almost everything, including slash, question mark, equals and ampersand, so it is right for a single value placed inside a URL, such as one query parameter.
  • Encode full URL uses encodeURI. It leaves the characters that give a URL its structure alone (slash, colon, question mark, ampersand, equals, hash), so it is right for a whole address.
  • Decode uses decodeURIComponent to turn percent codes back into readable text.

Examples

Encoding the value name=Ada Lovelace&city=São Paulo/Brazil?x=1 as a component gives name%3DAda%20Lovelace%26city%3DS%C3%A3o%20Paulo%2FBrazil%3Fx%3D1. Every structural character is escaped, which is what you want if this text is a single parameter value.

Encoding the whole address https://example.com/a b?q=café&x=1#top with the full-URL button gives https://example.com/a%20b?q=caf%C3%A9&x=1#top. The structure is intact and only the space and the accented letter are escaped.

Plus signs, percent signs and errors

Two details cause most mistakes. First, a literal percent sign must itself be encoded: "100% sure" becomes 100%25%20sure. Second, the plus sign is ambiguous. In an HTML form submission it means a space, but encodeURIComponent writes a real plus as %2B, and decodeURIComponent does not turn plus into a space: a+b decodes to a+b, while a%2Bb also decodes to a+b. If you decode form data, replace plus with a space first.

Decoding a string with a broken percent code, such as one that ends in %E0%A4%A, fails with the message "Invalid URL-encoded string". Check for a truncated copy or for text that was already decoded.

Related tools

To break an address into its protocol, host, path and parameters, use the URL Parser. To make a readable path segment from a title, the Slug Generator is easier than encoding by hand. For binary data in text form, see the Base64 Encoder Decoder. Everything runs in your browser.

Where encoded URLs appear

Percent encoding shows up in query strings from search forms, in links that contain file names with spaces, in redirects that carry another address as a parameter, and in tracking links. When one URL is placed inside another, as in a login redirect, the inner address must be encoded as a component, or its question marks and ampersands will be read as part of the outer URL. Decoding is useful when you want to read a long encoded link in a log file or an analytics report.

Learning resources

Explore more in Developer Tools, read the guides and articles, or see how we test our tools.

Share This Tool