URL Encoder & Decoder

Free online URL encoder and decoder with encodeURI and encodeURIComponent support. Features batch processing, history tracking, and keyboard shortcuts. Handles special characters, Chinese, Unicode, and emoji. 100% browser-based.

Private Real-time
0 characters
0 characters
Ctrl+E Encode Ctrl+D Decode Ctrl+Shift+C Copy Result

How to Use URL Encoder & Decoder

Enter Your URL or Text

Paste or type the URL or text you want to encode or decode into the input box.

Choose Encoding Method

Select encodeURI for complete URLs or encodeURIComponent for URL parameters.

View Instant Results

The encoded or decoded result appears in real-time as you type.

Copy the Result

Click the copy button to copy the result to your clipboard.

encodeURI vs encodeURIComponent

encodeURI

Use for encoding a complete URL.

Preserves: :// ? & = #

Input: https://example.com/path with spaces Output: https://example.com/path%20with%20spaces

encodeURIComponent

Use for encoding URL parameters or path segments.

Encodes: :// ? & = # too

Input: param=value&name=test Output: param%3Dvalue%26name%3Dtest

Tips for Best Results

  • Use encodeURIComponent for individual URL parameters
  • Use encodeURI for complete URLs that need safe transmission
  • Batch mode for multiple URLs - Enable "Batch Mode" to process multiple URLs or parameters at once, one per line
  • History tracking - Your recent encodings/decodings are saved locally. Click any history item to reload it
  • Keyboard shortcuts - Use Ctrl+E for Encode, Ctrl+D for Decode, Ctrl+Shift+C to copy
  • Privacy guaranteed - All processing happens in your browser. History is stored locally and never sent to servers
  • Unicode support - Works with Chinese, Japanese, emoji, and all Unicode characters

URL Encoding Reference Table

Reserved Characters

These characters have special meaning in URLs and may need encoding in certain contexts:

Character Encoded Description
!%21Exclamation mark
#%23Hash / Fragment
$%24Dollar sign
&%26Ampersand
'%27Single quote
( )%28 %29Parentheses
*%2AAsterisk
+%2BPlus sign
,%2CComma
/%2FForward slash
:%3AColon
;%3BSemicolon
=%3DEquals sign
?%3FQuestion mark
@%40At sign
[ ]%5B %5DSquare brackets

Unsafe Characters

These characters should always be encoded in URLs:

Character Encoded Description
Space%20 or +Space
"%22Double quote
< >%3C %3EAngle brackets
{ }%7B %7DCurly braces
|%7CVertical bar
\%5CBackslash
^%5ECaret
`%60Backtick

Safe Characters (Never Encoded)

These characters are always safe and never encoded:

A-Z a-z 0-9 - _ . ~

Frequently Asked Questions

URL encoding, also known as percent-encoding, is a mechanism for representing characters in a URL using only the ASCII character set. Characters that are not allowed in URLs (like spaces, Chinese characters, or special symbols) are converted to a % followed by two hexadecimal digits.

encodeURI encodes a complete URL but preserves URL structure characters like ://, ?, &, =, and #. Use it for encoding full URLs.

encodeURIComponent encodes ALL special characters including URL structure characters. Use it for encoding URL parameters or path segments.

Both represent a space, but in different contexts:

  • %20 is the standard URL-encoded representation (used in URL paths)
  • + is used in query strings (application/x-www-form-urlencoded format)

Our tool uses %20 for consistency with encodeURI/encodeURIComponent.

URL encoding uses UTF-8 by default. Chinese characters are converted to their UTF-8 byte representation, then each byte is encoded as %XX. For example:

  • "δΈ­" becomes %E4%B8%AD
  • "ζ–‡" becomes %E6%96%87
  • "πŸŽ‰" becomes %F0%9F%8E%89

Our tool handles all Unicode characters automatically.

Absolutely! All encoding/decoding happens entirely in your browser using JavaScript. Your URLs are never sent to any server. You can even use this tool offline once the page is loaded.

This usually happens when:

  1. The original encoding used a different character set (not UTF-8)
  2. The URL was double-encoded (try decoding multiple times)
  3. The input wasn't properly encoded in the first place

Yes! Choose the right method:

  • Use encodeURI for complete URLs (preserves ://, ?, &, etc.)
  • Use encodeURIComponent for URL parameters only

Batch Mode allows you to process multiple URLs or text strings at once. When enabled, each line in the input is encoded or decoded separately.

Use Batch Mode when you need to:

  • Encode multiple URL parameters at once
  • Process a list of URLs
  • Bulk convert data from a spreadsheet or list

Simply check the "Batch Mode" checkbox and enter one item per line.

The history feature automatically saves your recent encoding/decoding operations:

  • Up to 20 recent items are saved in your browser's local storage
  • History includes the input, output, mode, and timestamp
  • Click any history item to instantly reload it into the tool
  • Data never leaves your device - it's stored locally in your browser

You can disable history tracking by unchecking the "Save encoding history" option, or clear all history with the "Clear History" button.

The following keyboard shortcuts are available for faster workflow:

  • Ctrl+E - Switch to Encode mode
  • Ctrl+D - Switch to Decode mode
  • Ctrl+Shift+C - Copy the result to clipboard

These shortcuts work anywhere on the page, making it easy to switch modes without using the mouse.

How URL Encoding Works

URL encoding converts characters into a format that can be transmitted over the Internet. Since URLs can only contain ASCII characters, any character outside this set must be encoded.

The Encoding Process

  1. Character β†’ UTF-8 Bytes - The character is converted to its UTF-8 byte representation
  2. Bytes β†’ Hexadecimal - Each byte is converted to a two-digit hexadecimal number
  3. Hex β†’ Percent-Encoded - A % prefix is added to each hex number

Example: Encoding "Hello World"

Original: Hello World
β†’
Space β†’ %20: Hello%20World

Example: Encoding Chinese Characters

Character UTF-8 Bytes Encoded
δΈ­E4 B8 AD%E4%B8%AD
ζ–‡E6 96 87%E6%96%87
πŸŽ‰F0 9F 8E 89%F0%9F%8E%89

Why URL Encoding is Necessary

  • URL Specification - URLs are defined in RFC 3986 to use ASCII only
  • Reserved Characters - Characters like ?, &, = have special meaning in URLs
  • Unsafe Characters - Some characters may be misinterpreted or corrupted during transmission
  • Internationalization - Non-English characters need encoding for safe transmission

URL Encoding in Different Languages

JavaScript

encodeURI("https://example.com/path with spaces");
// "https://example.com/path%20with%20spaces"

encodeURIComponent("param=value&name=test");
// "param%3Dvalue%26name%3Dtest"

Python

from urllib.parse import quote, quote_plus

quote("path with spaces")  # "path%20with%20spaces"
quote_plus("query value")  # "query+value"

PHP

urlencode("value with spaces");  // "value+with+spaces"
rawurlencode("path with spaces");  // "path%20with%20spaces"

About URL Encoder & Decoder

Free online URL encoder and decoder with encodeURI and encodeURIComponent support. Features batch processing, history tracking, and keyboard shortcuts. Handles special characters, Chinese, Unicode, and emoji. 100% browser-based.

Tags: url encoder url decoder encode url online decode url online percent encoding url encode uri encoder url escape encodeuri encodeuricomponent batch url encode url encoding history url encoder with shortcuts online uri encoder