Skip to main content
ToolsHub

URL Encoder / Decoder

Encode or decode URLs and query parameters instantly. Switch between full URL encoding and component encoding.

Files never leave your browser
Common URL characters reference
CharEncodedNote
%20space
&%26ampersand
=%3Dequals
+%2Bplus
?%3Fquestion mark
#%23hash
/%2Fslash (component)
:%3Acolon (component)
@%40at (component)
%%25percent

How to use URL Encoder / Decoder

The URL Encoder / Decoder converts special characters in URLs to and from their percent-encoded equivalents. Spaces, non-ASCII letters, and reserved characters such as &, =, and # must be percent-encoded before being included in a URL query string or path segment. This tool is essential when constructing API calls, debugging HTTP requests and embedding dynamic values in links.

  1. Paste the text or URL you want to encode or decode into the input field.
  2. Choose Encode to convert special characters to %XX sequences.
  3. Choose Decode to convert %XX sequences back to readable characters.
  4. Select the encoding scope: encode full URL (preserves ://) or encode component (encodes everything including :, /, ?).
  5. Copy the result from the output panel.

Your data never leaves your device — 100% private processing.

Percent-encoding rules

Percent-encoding replaces each unsafe byte with a % sign followed by two uppercase hexadecimal digits representing that byte value. RFC 3986 defines unreserved characters (A–Z, a–z, 0–9, -, _, ., ~) which must never be encoded. Reserved characters (: / ? # [ ] @ ! $ & ' ( ) * + , ; =) have special meaning in URLs and must be encoded when used as literal data in a component. A space is encoded as %20 (or + in application/x-www-form-urlencoded form data).

encodeURI vs encodeURIComponent

JavaScript provides two built-in functions for URL encoding. encodeURI is intended for a complete URL and leaves reserved characters (/, ?, #, &, =, :) intact so the URL structure remains valid. encodeURIComponent encodes all characters except unreserved ones, making it safe for encoding individual query parameter names and values. Always use encodeURIComponent for user-supplied data in query strings to prevent injection of additional parameters.

Characters encoded by each function
CharacterencodeURIencodeURIComponent
Space%20%20
/preserved%2F
?preserved%3F
#preserved%23
&preserved%26
=preserved%3D
@preserved%40

Glossary

Percent-encoding
Replacing unsafe URL characters with a % followed by two hex digits representing the byte value.
Query string
The part of a URL after ? containing key=value pairs separated by & characters.
URI
Uniform Resource Identifier — a string that identifies a resource by location, name, or both.
Reserved characters
Characters with special meaning in URI syntax (/, ?, #, &, =, etc.) that must be encoded when used as literal data.
IDN
Internationalized Domain Name — a domain name containing non-ASCII characters, encoded using Punycode.

Related reading

Frequently Asked Questions

Free · No spam

Get weekly tool tips & updates

New tools, power-user tips, and productivity hacks — delivered free every Friday.

No spam, ever. Unsubscribe with one click.

Why use URL Encoder / Decoder?

  • No installation — use directly from any browser
  • Handles large inputs without crashing or timeouts
  • Syntax highlighting and formatted output for readability
  • Copy to clipboard shortcut for fast workflow integration

Common use cases

  • Validate and format JSON responses from APIs
  • Encode/decode Base64 strings during debugging
  • Generate UUIDs for database seeds or test data
  • Minify CSS or JavaScript before deployment
  • Diff two code snippets to spot regressions

Related Developer Tools

Explore all Developer Tools.