Skip to content
BCBinary Code Translator
Menu

URL Encoder / Decoder

Encode text to URL-safe format or decode URL-encoded text. Auto-detects input format for seamless conversion.

Input
0 chars·0 words·0 lines
Output
0 chars
Try an example

How URL Encoding Works

URL encoding converts text to UTF-8 bytes, then replaces each byte that needs escaping with a % prefix followed by two hexadecimal digits. ASCII characters occupy one UTF-8 byte, while a non-ASCII character may produce several percent escapes.

Common URL Encoded Characters:

Character URL Encoded
Space %20
! %21
# %23
& %26
= %3D
? %3F
/ %2F
: %3A

Note: Spaces can also be encoded as + in query strings, but %20 works universally.

URL Encoding Examples

Here are some common URL encoding examples:

Original URL Encoded
hello world! hello%20world%21
https://example.com?q=hello world https%3A%2F%2Fexample.com%3Fq%3Dhello%20world
file name.txt file%20name.txt
$100 OFF! %24100%20OFF%21

When to Use URL Encoding

  • Query Parameters: Encode values in URLs like ?name=John%20Doe
  • Form Submissions: Encode form data submitted via GET requests
  • API Requests: Ensure URLs with special characters work correctly
  • Database Values: Encode values that will be part of a URL
  • File Paths: Encode filenames that contain spaces or special characters

Frequently asked questions

What is URL encoding?

URL encoding (percent-encoding) converts text into a URL-safe form. Each percent escape contains two hexadecimal digits for one byte of the character's UTF-8 encoding; ASCII characters use a single byte.

Why use URL encoding?

URLs can only contain certain ASCII characters (A-Z, a-z, 0-9, and some special characters). URL encoding allows safe transmission of spaces, symbols, and non-ASCII characters.

What characters need to be encoded?

Spaces, most punctuation, and all non-ASCII characters should be encoded. Safe characters include A-Z, a-z, 0-9, and -_.~

What does %20 mean in a URL?

%20 is the URL-encoded representation of a space character. It ensures URLs with spaces remain valid and properly interpreted.

Related tools

View all tools

Cookie Preferences

Manage your cookie preferences. Necessary cookies cannot be disabled.

Necessary

Required

Required for language selection, privacy choices, and basic site functionality.

Cookies: NEXT_LOCALE

Analytics

Optional analytics cookies help us understand traffic and improve the website.

Cookies: _ga, _gid, _gat, _clck, _clsk

Advertising

Optional advertising cookies may be used to show relevant ads and measure performance.

Cookies: __gads, _gcl_au, IDE