Skip to content

URL Encoder & Decoder

Percent-encode a single URL component — one query value, one path segment — or decode one back to readable text. Runs in your browser; nothing is uploaded.

URI Percent-Encoding Standards

DuckConvert implements standard RFC 3986 compliance. Unsafe, non-ASCII, and reserved characters are safely mapped to their hex byte-triplets using modern Unicode UTF-8 character specifications.

Unlike old legacy systems that convert spaces to plus symbols (+), our tool supports standard percent-encoding (%20) alongside standard decode routines, making it highly compatible with REST API architectures.

Confidentiality and Safe Environment

  • Secure Sandbox Memory: Bypasses remote server databases. Data is parsed strictly in-memory using native JS string decoders.
  • Sub-millisecond Performance: Live translating maps strings in real-time without server processing lag or networking delays.
  • Wide Compatibility: Works perfectly on all major web browser platforms, ensuring a uniform developer utility experience.

This encodes a component, not a whole URL

The distinction decides whether the output is usable. A whole URL needs its structural punctuation left intact: :// separating scheme from host, slashes dividing the path, ? opening the query, & between pairs. A component — the text you are putting into one of those slots — needs exactly the opposite, because a stray & inside a value would end it early.

This tool does the second job. Paste https://a.com/p?x=1&y=2 in and you get https%3A%2F%2Fa.com%2Fp%3Fx%3D1%26y%3D2, with the structure escaped away. That output is correct, and exactly what you want when the URL is itself a parameter — a redirect_uri, a callback, a link inside a tracking wrapper. It is not what you want if you were hoping to clean up a link for the address bar.

The plus sign is the trap

Two encodings that look alike disagree about spaces. True percent-encoding writes a space as %20. The older form-submission format, application/x-www-form-urlencoded — what an HTML form produces and what most query strings you meet in the wild actually are — writes it as +.

This tool speaks the first dialect. Encoding a b gives a%20b, never a+b. Decoding is where it bites: feed it a+b and you get a+b back, not a b. The plus is a literal plus here. If you are decoding a query string that came from a form and the words have run together with plus signs between them, replace the plus signs with spaces yourself first — and be aware you cannot then tell a space apart from a plus that was meant literally, which is the flaw that made the format obsolete.

What is left alone, and what raises an error

  • Never encoded: letters, digits, and - _ . ! ~ * ' ( ). That set is wider than the one RFC 3986 calls unreserved, which stops at - _ . ~. The five extras are a holdover from the superseded RFC 2396, so a strict encoder elsewhere may escape them and produce a different — equally valid — string.
  • Non-ASCII becomes UTF-8 bytes. Each byte gets its own percent triplet, so one Cyrillic щ encodes to %D1%89, and an emoji to four triplets.
  • Malformed input is rejected, not guessed at. Decoding a truncated escape such as %E0%A4%A, or any percent not followed by two hex digits, reports an error rather than returning a partial string.
  • Unpaired surrogates fail to encode. Text carrying half of a surrogate pair — usually the sign of a string that was already truncated mid-emoji — cannot be turned into valid UTF-8 and is reported as invalid.

URL Encoder & Decoder Frequently Asked Questions

What is URL encoding (percent-encoding)?

URL encoding, also known as percent-encoding, is a mechanism used to translate characters in a Uniform Resource Identifier (URI) under specific conditions. Characters that do not fall inside the standard unreserved character set must be represented as a percent sign (%) followed by a two-digit hexadecimal representation corresponding to the character's ASCII/Unicode byte value.

Why is URL encoding necessary?

URLs can only be sent across the internet using the standard US-ASCII character set. Certain characters have specific structural meanings within URLs (such as '?' for query parameters, '&' for separators, and '/' for paths). If you need to pass raw text, search phrases, or key-value structures containing these special characters inside a URL query string, you must encode them so that routers and web servers do not misinterpret the URL's layout.

Which characters are commonly encoded?

Unreserved safe characters (which are never encoded) include letters (A-Z, a-z), digits (0-9), and basic punctuation (hyphen '-', underscore '_', period '.', tilde '~'). Reserved characters that must be encoded if they represent raw data instead of URL syntax include space (encoded as '%20' or '+'), question mark '%3F', ampersand '%26', equals '%3D', forward-slash '%2F', and octothorpe '%23'.

Why should I use a local offline URL tool?

Many developers use public URL tools to decode URLs containing proprietary corporate endpoints, confidential emails, internal database keys, or API tokens. Sending these URLs to external online encoders logs your configurations in their cloud servers, posing a heavy privacy risk. DuckConvert runs purely on the client side inside your browser memory, keeping your links completely confidential.