utilstuff.com
Back to Dev Tools

URL Encoder / Decoder

Encode and decode URLs, URIs, and query parameters using standard percent-encoding (encodeURIComponent, encodeURI, form-urlencoded). 100% client-side, fast and secure.

100% Client-Side Privacy & Execution Guarantee
All URL percent-encoding and decoding is executed locally inside your Web Browser using JavaScript standard engines. Input data is never sent to external servers or stored in memory cookies.
Data Representation Notice (Not Encryption)

URL percent-encoding is a data transformation mechanism for safe URI transmission. It does not provide security, confidentiality, or data obfuscation. Do not pass unencrypted secrets in plain URLs.

Standards Comparison: URL Component vs Full URL vs Form Data

InputURL ComponentFull URLForm Data
hello worldhello%20worldhello%20worldhello+world
a+ba%2Bba+ba%2Bb
a&ba%26ba&ba%26b
a=ba%3Dba=ba%3Db

Form Data (application/x-www-form-urlencoded) is used by HTML forms and POST request bodies, where spaces are represented as +.

Sample Test Vectors & Common Scenarios

Form Data (Spaces → +)Form Data
hello world
Plus Sign & Special CharsForm Data
C++ programming
Form Fields & ParamsForm Body
name=John Doe&email=test@example.com
Unicode & AccentsUnicode Form
Bogotá, Colombia
Emoji & SpacesEmoji Form
🔐 secure data
Decode Plus as PlusDecode Plus
C%2B%2B

Understanding URL / URI Percent-Encoding

URI Percent-encoding translates arbitrary characters into standard ASCII printable characters safe for transmission across the internet. Reserved characters like ?, /, #, &, =, and : have special structural meanings in URIs. Depending on whether you are encoding a full URL, a query component, or application/x-www-form-urlencoded form data, different rules apply.

What Is URL Encoding?

Percent-encoding (URL encoding) replaces characters that aren't safe inside a URL — spaces, symbols, and non-ASCII characters — with a % followed by their hexadecimal byte value, so links and query strings survive being copied, pasted, and transmitted by any browser or server.

How to Use the URL Encoder / Decoder

  1. Paste the text or URL you want to encode, or a percent-encoded string you want to decode.
  2. Pick a mode: encodeURIComponent for a single value (like a query parameter), encodeURI for a full URL, or form-urlencoded for HTML form submissions.
  3. Choose Encode or Decode.
  4. Copy the result.

Technical Notes

  • encodeURIComponent escapes reserved characters such as &, =, and / so a value is safe to embed inside a query string; encodeURI leaves those characters intact because it expects a complete URL.
  • form-urlencoded (application/x-www-form-urlencoded) represents spaces as + instead of %20 — the convention browsers use for HTML form submissions.
  • Encoding is fully reversible and adds no security or privacy — it only makes text safe to transport inside a URL.

Example

encodeURIComponent
hello world & friends→hello%20world%20%26%20friends

Frequently Asked Questions

What is the difference between URL Component and Full URL encoding?+

URL Component mode (encodeURIComponent) encodes all reserved characters (?, /, #, &, =, :, @) so text can safely be used as a query parameter value. Full URL mode (encodeURI) preserves URI structural syntax while encoding spaces, Unicode, and unprintable characters.

Why are spaces encoded as + in Form Data mode?+

The application/x-www-form-urlencoded specification (commonly used in HTML form submissions and HTTP POST requests) specifically encodes spaces as + instead of %20. Literal plus signs (+) are encoded as %2B.

How does decoding handle + versus %2B?+

In Form Data mode, decoding replaces literal + signs with spaces first, then percent-decodes UTF-8 sequences. Therefore, %2B is correctly converted to + while + becomes a space.

What happens if I try to decode a malformed percent string?+

If the input contains invalid hexadecimal pairs or truncated UTF-8 sequences (such as %ZZ or %E0%A4), the tool catches the URI error cleanly and displays an error message without crashing.