UtilityKit

500+ fast, free tools. Most run in your browser only; Image & PDF tools upload files to the backend when you run them.

URL Encoder

Encode and decode URLs

About URL Encoder

URL Encoder on UtilityKit encodes plain text and URLs into percent-encoded form for safe HTTP transmission, and decodes them back to readable text — inside your browser with no server round-trip. It exposes two encoding modes: full URL encoding (encodeURI) preserves structural characters like /, ?, and # so a complete URL stays valid; component encoding (encodeURIComponent) escapes those characters too, which is correct for individual query-string values and API payloads. A Swap button flips output to input for chained operations. Characters outside the unreserved ASCII set — spaces, ampersands, Unicode, and emoji — become %XX percent-escapes. Practical uses: fixing broken redirect URLs, building query parameters, reading obfuscated tracking links, and preparing mailto: href values. All encoding uses the browser's native JavaScript functions.

Why use URL Encoder

Correct Component vs Full-URL Encoding

The tool separates encodeURI (safe for full URLs) from encodeURIComponent (safe for query values), so you always apply the right escaping rule and avoid double-encoding bugs.

Fix Broken URLs Instantly

Paste a URL containing spaces, Unicode characters, or special symbols and encode it in one click to produce a browser-safe string that does not break when followed or pasted into an address bar.

Decode Obfuscated Query Strings

Paste a percent-encoded redirect or tracking URL and decode it to plain text to read the actual destination, campaign parameters, or injected values without guessing.

Swap for Chained Operations

The Swap button moves output back to input in one click, letting you encode then re-decode (or vice versa) to verify round-trip fidelity without manual copy-pasting.

Emoji and Unicode Support

Multi-byte Unicode characters and emoji are correctly encoded to their UTF-8 percent-escape sequences (e.g. 🎉 → %F0%9F%8E%89), matching exactly what browsers and servers expect.

Browser-Native — No Server, No Data Risk

Encoding and decoding use the browser's own encodeURI, encodeURIComponent, and decodeURIComponent functions — identical behavior to Node.js, zero server involvement.

How to use URL Encoder

  1. Paste the URL or text string you want to encode or decode into the Input field.
  2. Click 'Encode →' to apply full URL encoding (preserves /, ?, #, and other structural URL characters).
  3. Click 'Encode Component' to apply component encoding (escapes everything except letters, digits, and - _ . ~) — use this for individual query-parameter values.
  4. Click '← Decode' to decode a percent-encoded string back to readable text — works with both encodeURI and encodeURIComponent output.
  5. Copy the result using the Copy button, or click Swap to move the output back into the input field for chained operations.
  6. Click Clear to reset both fields and start over.

When to use URL Encoder

  • When building a redirect URL that contains a destination parameter with slashes or query strings and you need to safely embed it as a value in the outer URL.
  • When calling a REST API and the query parameter value contains spaces, special characters, or Unicode that must be percent-encoded before appending to the endpoint.
  • When a user-submitted form value is going into a URL and you need to sanitize it so it does not accidentally break the query string structure.
  • When receiving a percent-encoded URL in a server log, email header, or API response and you want to decode it to readable text for debugging.
  • When constructing a mailto: or tel: link in HTML and need to encode the subject line or body to handle special characters gracefully.
  • When verifying that a third-party tool or library is producing the correct percent-encoding for a specific string — use this as a reference ground truth.

Examples

Encode a search query with special characters

Input: search?q=C++ & Python tutorials

Output: search?q=C%2B%2B%20%26%20Python%20tutorials (using Encode Component on the value part only)

Decode a tracking URL parameter

Input: https%3A%2F%2Fexample.com%2Fproduct%3Fid%3D42%26ref%3Demail

Output: https://example.com/product?id=42&ref=email

Encode a redirect destination parameter

Input: https://app.example.com/dashboard?tab=settings&user=42

Output: https%3A%2F%2Fapp.example.com%2Fdashboard%3Ftab%3Dsettings%26user%3D42 (safe to embed as a query value)

Tips

  • Always use Encode Component (not plain Encode) when the value you are encoding will be embedded as a query-parameter value — otherwise characters like & and = inside the value will be misread as parameter separators.
  • To decode a URL you found in a log file, paste the entire percent-encoded string and click Decode. If it still looks partially encoded after decoding, click Swap and decode again — some systems double-encode URLs.
  • To build a safe redirect URL like /go?to=https://example.com/path?q=1, encode just the destination (https://example.com/path?q=1) using Encode Component, then append the result to the /go?to= prefix.
  • Emoji in social media URLs often appear percent-encoded in share links. Paste and decode them to reveal the original emoji in the title or UTM parameter for easier reading.
  • If you are generating a mailto: link, encode the subject and body values with Encode Component — email clients expect spaces as %20 in these fields.

Frequently Asked Questions

What is the difference between 'Encode' and 'Encode Component'?
Encode uses encodeURI, which keeps structural URL characters like /, ?, #, &, and = intact — it is safe for a complete URL. Encode Component uses encodeURIComponent, which escapes those characters too — it is the correct choice for an individual query-parameter value or form field.
What characters get percent-encoded?
Characters outside the unreserved ASCII set (A–Z, a–z, 0–9, -, _, ., ~) are encoded. For full URL encoding, structural characters like /, ?, #, and & are also left intact. For component encoding, every character except the unreserved set is escaped.
Does it support emoji and Unicode?
Yes. Unicode characters and emoji are encoded as their UTF-8 byte sequences in percent form. For example, 🎉 encodes to %F0%9F%8E%89, which is what browsers and most HTTP clients produce natively.
Why does decoding produce garbled text for some inputs?
If the encoded string was produced with a non-UTF-8 encoding (e.g. Latin-1 or Windows-1252), the decoded result may appear garbled. The decoder assumes UTF-8, which is the standard for all modern web URLs.
What does the Swap button do?
Swap moves the current output back into the input field and clears the output, letting you continue with a chained operation — such as decoding a string you just encoded to verify the round-trip is lossless.
Is %20 or + used for spaces?
This tool uses %20 for spaces, which is the RFC 3986 standard for URL paths and query strings. The + convention is specific to application/x-www-form-urlencoded bodies and should not be used in URLs submitted to a server via GET.
Can I use this to encode passwords or credentials in a URL?
You can encode the characters, but embedding credentials in a URL is a security anti-pattern — URLs appear in logs, browser history, and referrer headers. Use Authorization headers or a secure body payload instead.
Is URL Encoder free to use?
Yes. URL Encoder on UtilityKit is completely free with no sign-up, no account, and no usage limits.

Explore the category

Glossary

Percent-encoding
A mechanism defined in RFC 3986 for representing arbitrary characters in a URI by replacing them with a percent sign followed by two hexadecimal digits representing the character's UTF-8 byte value. Also called URL encoding.
encodeURI
A JavaScript function that percent-encodes a full URL, leaving structural characters (/, ?, #, &, =, :) intact so the URL remains navigable after encoding.
encodeURIComponent
A JavaScript function that encodes a single URL component (e.g. a query-parameter value), escaping structural characters like /, ?, &, and = so they cannot be misinterpreted as URL syntax.
Unreserved characters
The set of ASCII characters — letters (A–Z, a–z), digits (0–9), hyphen, underscore, period, and tilde — that never need percent-encoding in a URL.
Query string
The part of a URL after the ? character that carries key-value parameter pairs (e.g. ?page=2&sort=desc). Values that contain special characters must be percent-encoded before inclusion.
Double encoding
A bug where a URL is percent-encoded twice, turning %20 into %2520. Always decode the full string once before re-encoding to check for pre-existing percent sequences.