Encode and decode URLs and URI components online

0 characters

Examples

Original:Hello World!
Encoded:Hello%20World%21
Encoded:user%40example.com
Original:search?q=hello&lang=en
Encoded:search%3Fq%3Dhello%26lang%3Den

🔗 URL Encoder & Decoder — Free Online Tool

Encode text to URL-safe format or decode URL-encoded strings. URL encoding (percent-encoding) converts special characters into a format safe for transmission in URLs, as defined in RFC 3986. URLs can only contain alphanumeric characters and a few safe symbols; all other characters must be encoded as %XX (where XX is the hexadecimal ASCII code). This is essential for query parameters, form data, and URI components.

🚀 Why use this URL Encoder & Decoder tool?

Instantly encode and decode URL-safe strings with full support for special characters, emoji, and international text. 100% free, no registration, and complete privacy — everything runs locally in your browser, so your data never touches a server.

Key Features

Bidirectional Encoding

Switch between encode and decode modes to convert text to URL-safe format or reverse the process.

🌍International Support

Handles emoji, CJK characters, accented letters, and all Unicode safely.

📋One-Click Copy

Copy encoded or decoded output directly to the clipboard.

💾Character Counter

Live character count for input and output shows encoding size impact.

Popular Use Cases

Web Development

  • Encode query parameters for safe URL construction (?search=hello%20world)
  • Encode form data before transmission
  • Encode special characters in API endpoints and paths

Debugging & Testing

  • Decode URLs from browser logs or network requests
  • Inspect encoded query strings to verify correct parameters
  • Test URL encoding logic before production deployment

Data Exchange

  • Safely transmit text containing spaces, &, =, #, and other reserved characters
  • Prepare data for email or messaging that may not support raw URLs
  • Encode credentials and sensitive data for secure URLs

Worked example

URL Encoding Example

Original Text

hello world & special=chars

Output:

hello%20world%20%26%20special%3Dchars

Sources & References

Frequently Asked Questions

What is URL encoding and why is it needed?

URL encoding (percent-encoding, RFC 3986) converts special characters into %XX format (XX = hex ASCII code) so they are safe to transmit in URLs. URLs can only contain unreserved characters (A–Z, a–z, 0–9, -, ., _, ~) and reserved delimiters. Spaces become %20, ampersands become %26, and so on. This ensures URLs are correctly parsed by servers and browsers.

What characters need to be URL-encoded?

Spaces, special symbols (&, =, #, ?, /, :, @, !, $, ', (, ), *, +, ,, ;), non-ASCII characters, and control characters must be encoded. Reserved characters (used for URL structure) like ?, #, &, = should be encoded if they are part of data rather than delimiters. Unreserved characters (A–Z, a–z, 0–9, -, ., _, ~) never need encoding.

What is the difference between encodeURI() and encodeURIComponent()?

encodeURI() encodes a full URL but leaves URL structure characters (/, :, ?, #) alone — use it for full URLs. encodeURIComponent() encodes EVERYTHING except unreserved chars — use it for query values, path segments, and form data. This tool uses encodeURIComponent, which is safe for individual components.

How do I encode a URL query string?

Use this tool to encode each query parameter value individually. For example, encode 'hello world' to get 'hello%20world', then construct your URL as 'https://example.com?search=hello%20world'. Never encode the ? or & delimiters — only the values.

Can I decode URL-encoded text to see the original?

Yes. Switch to Decode mode and paste the encoded string. The tool will decode %XX sequences back to their original characters. For example, 'hello%20world' decodes to 'hello world'.

Does URL encoding work with emoji and CJK characters?

Yes. This tool encodes emoji, CJK, and accented characters using UTF-8 first, then percent-encoding. For example, '🎉' encodes to '%F0%9F%8E%89'. When decoded, it reverses perfectly. This ensures international text is safe in URLs.

🎓 Pro Tips

  • Tip 1: Always encode query parameter VALUES, not the delimiters (?, &, =) — leave those unencoded for URL structure.
  • Tip 2: Use the Swap button to quickly toggle between encoded and decoded versions while testing.
  • Tip 3: When building URLs in code, encode only the dynamic parts — hardcoded paths and scheme can stay as-is.
  • Tip 4: Spaces encode to %20 (not +, although + is used in some legacy form encodings) — this tool uses standard RFC 3986 percent-encoding.
  • Tip 5: If a URL already contains %XX sequences, decoding it twice will fail — always decode once and stop.

🔗 URL Encoder / Decoder — Free Online Tool

Encode and decode URL / percent-encoded text online, free. URL encoding (percent-encoding, defined by RFC 3986) replaces characters that aren't allowed in a URL with a % followed by their hex byte value — so a space becomes %20 and an ampersand becomes %26. This tool encodes text into a URL-safe form or decodes percent-encoded strings back to readable text, entirely in your browser.

🚀 Why use this URL Encoder / Decoder tool?

Encoding and decoding run locally with the browser's own encodeURIComponent / decodeURIComponent, so multi-byte UTF-8 characters round-trip correctly and nothing is uploaded. 100% free, no registration, and complete privacy — everything runs locally in your browser, so your data never touches a server.

Key Features

🔁Encode & decode

Convert text to percent-encoded form and back. Reserved characters (?, &, =, /, space, #) are escaped so they can't break a URL.

🌍Full UTF-8 support

Non-ASCII characters are encoded as their UTF-8 byte sequence (e.g. é → %C3%A9), matching how browsers and servers expect them.

Instant & in-browser

Results update immediately using the native encodeURIComponent/decodeURIComponent — no upload, no wait.

🔒100% private

Your input is processed locally and never sent anywhere — safe for URLs containing tokens or query data.

Popular Use Cases

Building URLs

  • Safely add user input to query strings
  • Encode path segments
  • Build share/deep links

API & debugging

  • Encode query parameters
  • Decode a captured request URL
  • Inspect redirect targets

Data handling

  • Encode form values
  • Decode webhook payloads in URLs
  • Fix double-encoded strings

What It Handles

Modes

  • Encode (text → %xx)
  • Decode (%xx → text)

Handles

  • Reserved characters
  • UTF-8 multi-byte
  • Spaces & symbols

Privacy

  • Client-side only
  • No network calls
  • Runs offline

Sources & References

Frequently Asked Questions

What is URL encoding?

URL encoding (percent-encoding) represents characters that have special meaning or aren't permitted in a URL using a % sign followed by their hexadecimal byte value. For example, a space becomes %20 and a slash becomes %2F. It keeps URLs valid and unambiguous.

What's the difference between encodeURI and encodeURIComponent?

encodeURIComponent escapes nearly everything that isn't a letter, digit, or a few safe symbols — use it for individual query values or path segments. encodeURI leaves characters that form a valid URL structure (like / ? : &) intact — use it for an entire URL. This tool uses encodeURIComponent so single values are fully escaped.

Why is a space sometimes %20 and sometimes +?

In the path and with encodeURIComponent, a space is %20. In the query string of HTML form submissions (application/x-www-form-urlencoded), a space is encoded as +. Both decode back to a space; %20 is the safer, more general choice.

What is double-encoding?

Double-encoding happens when already-encoded text is encoded again, turning %20 into %2520. If your decoded output still shows % sequences, decode it a second time. Encode only once when building a URL.

Is my input uploaded anywhere?

No. Encoding and decoding happen entirely in your browser; nothing you paste is sent to a server.

🎓 Pro Tips

  • Tip 1: Encode each query value separately with encodeURIComponent, then join them — encoding a whole assembled URL can wrongly escape the & and = separators.
  • Tip 2: If decoding leaves stray %25 sequences, the string was double-encoded — decode again.
  • Tip 3: Never put a raw, unencoded user value into a URL; it can break the link or enable injection.