URL Encoder/Decoder

Encode and decode URLs and URL components. Handle special characters, spaces, and non-ASCII characters with proper percent encoding.

0
Conversions
0
Current Chars
Encode
Mode

Upload a text file to encode/decode

Supports .txt files (max 1MB)

Text to Encode

Live preview: https://example.com/search?q=hello%20world&category=test

Encoded URL

Input: 0 chars
Output: 0 chars
Diff: +0%

Recent Conversions

How to Use This Tool

  1. Select whether you want to encode or decode using the tabs
  2. Enter your text or URL in the input field
  3. Choose encoding options if encoding (spaces, full encoding, etc.)
  4. Click "Convert" to process, or use the swap button to exchange input/output
  5. Copy to clipboard or download the result as a text file

Frequently Asked Questions

What is URL encoding?

URL encoding (also known as percent-encoding) is a mechanism for encoding information in a Uniform Resource Locator (URL). It converts special characters into a format that can be safely transmitted over the internet. For example, spaces become %20 or +, and characters like ?, &, = have special meanings in URLs and must be encoded.

When do I need to encode a URL?

You need to encode URLs when they contain special characters like spaces, ampersands (&), question marks (?), equals signs (=), or non-ASCII characters (like Γ©, Γ±, δΈ­ζ–‡). These characters have special meanings in URLs and need to be encoded to be transmitted correctly. For example, in query parameters, spaces are often encoded as + or %20.

What's the difference between encodeURI and encodeURIComponent?

encodeURI() is used to encode a complete URL, preserving characters that are part of the URL syntax (:, /, ?, &, =). encodeURIComponent() encodes everything, including these special characters, and is used for encoding query parameter values. Our "Full URL encoding" option uses encodeURIComponent.

Should I use %20 or + for spaces?

In URL paths, spaces must be encoded as %20. In query strings (after ?), spaces can be encoded as either + or %20. The + form is commonly used in form data (application/x-www-form-urlencoded). Our tool supports both options - check "Encode spaces as %20" or "Use + for spaces" depending on your needs.

How do I handle Unicode characters in URLs?

Unicode characters (like emojis or non-Latin scripts) must be encoded using UTF-8 percent encoding. Our "Encode Unicode characters" option handles this automatically. For example, 'cafΓ©' becomes 'caf%C3%A9' and 'πŸ”₯' becomes '%F0%9F%94%A5'.

Common Encodings

  • Space: %20 or +
  • ! %21
  • # %23
  • $ %24
  • & %26
  • + %2B
  • , %2C
  • / %2F
  • : %3A
  • ; %3B
  • = %3D
  • ? %3F
  • @ %40

URL Structure

  • Protocol: https://
  • Domain: example.com
  • Path: /path/to/page
  • Query: ?key=value
  • Fragment: #section