URL Decode

Turn percent encoded text back into readable characters. Paste an encoded URL or query string and read the plain version, decoded right in your browser.

0 characters

0 characters

About URL Decode

This tool performs URL decoding, a process that reverses percent-encoding[1] to convert escaped octet sequences back into their original character representation. Percent-encoding is a fundamental mechanism for data transport within a Uniform Resource Identifier (URI)[2], ensuring that data can be correctly and safely transmitted over the internet. The process involves representing an arbitrary byte of data as a triplet, consisting of a percent sign character (`%`) followed by the two hexadecimal digits that form the byte's value. For example, a space character is encoded as `%20`. This tool parses such sequences and displays the resulting human-readable text, making it an essential utility for developers, security analysts, and network engineers working with web data.

The rules for percent-encoding are formally defined by the Internet Engineering Task Force (IETF)[4] in RFC 3986[19], the current standard for URI syntax. This standard delineates characters into two sets: "reserved" and "unreserved". Unreserved characters (alphanumerics and `-`, `.`, `_`, `~`) have no special meaning and do not require encoding. Reserved characters (e.g., `:`, `/`, `?`, `#`, `[`, `]`, `@`) serve as delimiters for URI components. If a reserved character needs to appear as literal data within a component, it must be percent-encoded. For instance, to include a literal slash `/` within a URL's query parameter, it must be encoded as `%2F` to prevent it from being misinterpreted as a path separator.

A critical aspect of decoding is the underlying character encoding. Percent-encoding itself is character-set-agnostic; it simply encodes raw bytes (octets[5]). The correct interpretation of the decoded bytes depends on knowing the character set used during the encoding process. For the modern web, the universal standard is UTF-8[6], which can represent any character in the Unicode[7] standard. Attempting to decode a UTF-8 string using a different character map, such as the legacy ISO/IEC 8859-1[8], can lead to incorrectly rendered text, a phenomenon known as mojibake[9]. This tool correctly assumes UTF-8 for all decoding operations, aligning with modern web standards defined by bodies like the WHATWG[10].

The history of URI encoding dates back to the inception of the World Wide Web. The initial concept was outlined by Tim Berners-Lee[11] in RFC 1630[21] in 1994. This was later formalized in RFC 2396[22] (1998) before being superseded by the current standard, RFC 3986 (2005). These standards have been crucial for creating a stable and interoperable system for resource location on the internet. The World Wide Web Consortium (W3C)[12] and WHATWG also provide specifications that build upon these RFCs, detailing how web browsers should handle URLs[3] in practice, including the parsing and processing of percent-encoded data.

Beyond the address bar, percent-encoding is integral to HTML form submissions using the `application/x-www-form-urlencoded` media type. A notable distinction exists in this context: space characters are encoded as a plus sign `+` instead of `%20`. This is a legacy behavior specified in early HTML standards like the W3C's HTML 4.01 specification[24]. A robust decoder must be able to handle both `%20` and `+` as representations of a space, depending on the context. This tool is designed to correctly interpret both forms, providing accurate decoding for query strings and form data alike.

How to Use

  1. Paste your percent-encoded text into the provided input area.
  2. The tool automatically decodes the input string in real-time.
  3. The decoded, human-readable output appears instantly in the results field.
  4. Click the 'Copy' button to copy the decoded text to your clipboard.
  5. You can clear the input field to start over with a new string.

Frequently Asked Questions

What is the difference between URL encoding and percent-encoding?

The terms are often used interchangeably. Percent-encoding[1] is the specific mechanism (% followed by two hex digits) used to encode data. URL encoding is the process of applying percent-encoding to a string to make it safe for inclusion in a URL[3].

Why is a space sometimes a '+' and sometimes '%20'?

A space is encoded as `+` in the specific context of `application/x-www-form-urlencoded` data, which is used for submitting HTML form values. This is defined in specifications like the W3C HTML 4.01 spec[24]. In all other parts of a URI, such as the path or query string directly, a space must be encoded as `%20` according to RFC 3986[19].

What character set does this tool use for decoding?

This decoder assumes UTF-8[6], which is the predominant character encoding on the web. Decoding data that was encoded with a different character set (like Windows-1252[13]) may result in incorrect characters, a problem known as mojibake[9].

Is it always safe to use the output of a URL decoder?

No. The act of decoding is safe, but the resulting string is effectively user-provided input. If the decoded text is rendered in a web page or used in a database query, it must be properly sanitized to prevent security vulnerabilities like Cross-Site Scripting (XSS)[14] or SQL injection.

What are 'reserved' and 'unreserved' characters?

As defined in RFC 3986 section 2.2[20], reserved characters (e.g., `:`, `/`, `?`) act as delimiters and have special meaning in a URI's structure. Unreserved characters (e.g., `A-Z`, `a-z`, `0-9`, `-`, `.`, `_`, `~`) have no special meaning and do not need to be percent-encoded. This tool decodes any valid percent-encoded sequence.

What is a 'double encoding' attack?

Double encoding involves applying percent-encoding twice to a character. For example, `<` becomes `%3C`, which then becomes `%253C`. An attacker might use this to bypass a security filter that only decodes input once. If the filter decodes `%253C` to `%3C` and sees no threat, a vulnerable application might decode it a second time to `<`, executing a malicious script.

How is URL decoding different from Base64 decoding?

They are entirely different encoding schemes for different purposes. Percent-encoding makes data safe for inclusion in a URL's path or query string. Base64[15] is a binary-to-text encoding that represents any binary data using only 64 printable ASCII[16] characters, often used for data URLs or email attachments.

Is this related to Punycode?

No. Punycode[17] is a separate encoding defined in RFC 3492[23]. It is used to represent Unicode[7] characters in domain names, which are restricted to a small subset of ASCII characters. This system is known as Internationalized Domain Names (IDNs)[18] and is unrelated to percent-encoding in URL paths or queries.

Sources (24)
  1. Wikipedia: Percent-encoding
  2. Wikipedia: Uniform Resource Identifier (URI)
  3. Wikipedia: Uniform Resource Locator (URL)
  4. Wikipedia: Internet Engineering Task Force (IETF)
  5. Wikipedia: Octet (computing)
  6. Wikipedia: UTF-8
  7. Wikipedia: Unicode
  8. Wikipedia: ISO/IEC 8859-1
  9. Wikipedia: Mojibake
  10. Wikipedia: WHATWG
  11. Wikipedia: Tim Berners-Lee
  12. Wikipedia: World Wide Web Consortium (W3C)
  13. Wikipedia: Windows-1252
  14. Wikipedia: Cross-Site Scripting (XSS)
  15. Wikipedia: Base64
  16. Wikipedia: ASCII
  17. Wikipedia: Punycode
  18. Wikipedia: Internationalized Domain Name (IDN)
  19. IETF RFC 3986: Uniform Resource Identifier (URI): Generic Syntax
  20. IETF RFC 3986, Section 2.2: Reserved Characters
  21. IETF RFC 1630: Universal Resource Identifiers in WWW
  22. IETF RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax
  23. IETF RFC 3492: Punycode: A Bootstring encoding of Unicode
  24. W3C HTML 4.01 Specification: Form content types

About Matt George

I'm Matt George, a software engineer in the startup space. I run my own shop building software for early-stage founders, and I love making free tools and experiences that people actually use. Enjoy using URL Decode!

More Free Tools