URL Encode/Decode Tool Icon

URL Encode/Decode

Online URL encoding and decoding tool, supports intelligent encoding and decoding of URL parameters, automatically identifies URL structure, processes only the parameter part, completes entirely in the browser locally, safe and efficient.

Tool Description

URL Encode/Decode is an online URL encoding/decoding tool that can URL-encode (percent-encode) or decode text content. URL encoding converts special characters into %XX hexadecimal format to ensure correct transmission over the internet. The tool supports smart recognition of complete URL structures, automatically encoding/decoding only the query parameter portion while preserving the protocol, domain, and path unchanged. All operations run locally in your browser — no data is uploaded to any server.

How to Use

  1. Enter Content

    Enter or paste the URL or text content to process in the left input box

  2. Choose an Action

    Click the "Encode" button to convert special characters in the text to URL-safe format, or click "Decode" to restore the encoded URL to readable text

  3. Save the Result

    The encoded/decoded result will appear in the right output box. You can click "Copy" to copy the result or "Download" to save it as a text file

Use Cases

  • API Request Parameters: URL-encode query parameters when constructing HTTP GET/POST requests to ensure parameters with Chinese or special characters are correctly transmitted (e.g., ?name=%E5%BC%A0%E4%B8%89)
  • Frontend Development Debugging: Quickly encode/decode Chinese parameters in URLs for inspecting and modifying query strings in the browser address bar
  • Data Cleaning: Batch-decode URL-encoded data from web scraping or logs to recover the original text content

Key Advantages

  1. Smart URL Recognition

    Automatically identifies full URL structure and only encodes/decodes the query parameter portion, keeping the protocol, domain, and path unchanged for more precise processing

  2. Free Daily Usage

    Free daily usage is provided for every user, so routine URL encoding needs can be met at zero cost; frequent or professional use can unlock more quota by subscribing to membership

  3. Privacy & Security

    All encoding and decoding run entirely in your browser; your data is never uploaded to any server, providing 100% privacy protection

  4. Encode & Decode

    Supports both URL encoding and URL decoding, with a built-in swap button to quickly exchange input and output for a seamless workflow

  5. Full Chinese Support

    Processes text using UTF-8 encoding, so Chinese, Japanese, Korean, and any other Unicode characters are encoded/decoded correctly

  6. No Installation Needed

    No installation or registration required; open your browser and use it right away, compatible with PC and mobile platforms

URL Encoding Principle

URL encoding (also known as percent-encoding) is a mechanism that converts special characters in URLs into %XX format, where XX is the hexadecimal representation of the character's ASCII code. According to RFC 3986, URLs may only contain a limited set of characters (unreserved characters); all other characters must be percent-encoded.

For non-ASCII characters (such as Chinese), URL encoding first converts them to a UTF-8 byte sequence, then percent-encodes each byte. For example: the Chinese characters "你好" have the UTF-8 encoding E4 BD A0 E5 A5 BD (6 bytes), which becomes %E4%BD%A0%E5%A5%BD after URL encoding.

Smart Mode: When the input is a complete URL, the tool automatically identifies the URL structure. The path portion is encoded using encodeURI (preserving structural characters like /, :), query parameters are encoded using encodeURIComponent per parameter (encoding separators like &, =), and the Hash portion remains unchanged.

Common Character URL Encoding Reference

Character Encoding Character Encoding Character Encoding Character Encoding
!%21#%23$%24%%25
&%26'%27(%28)%29
*%2A+%2B,%2C/%2F
:%3A;%3B=%3D?%3F
@%40[%5B]%5D空格%20
"%22<%3C>%3E`%60

Difference Between encodeURI and encodeURIComponent

JavaScript provides two URL encoding functions with different encoding scopes:

Character Range encodeURI encodeURIComponent
A-Z a-z 0-9Kept UnencodedKept Unencoded
- _ . ! ~ * ' ( )Kept UnencodedKept Unencoded
; / ? : @ & = + $ , #Kept UnencodedEncoded as %XX

FAQ

What is URL encoding and why is it needed?

URL encoding (percent-encoding) is a way to convert special characters into %XX format. URLs can only use a subset of ASCII characters. If a URL contains Chinese, spaces, or other special characters (such as &, =, #), these characters must be encoded; otherwise, the URL may be parsed incorrectly or data may be lost during transmission.

Will the encoded URL be longer?

Yes. URL encoding converts each non-ASCII character into multiple %XX sequences. For example, one Chinese character (3-byte UTF-8) becomes %XX%XX%XX (9 characters) after encoding, tripling in length. Characters within the ASCII range (letters, digits) are not encoded and remain unchanged.

Does it support Chinese and other non-ASCII characters?

Fully supported. The tool uses UTF-8 encoding to process text, first converting non-ASCII characters to a UTF-8 byte sequence before URL encoding. It can correctly handle Chinese, Japanese, Korean, and any other Unicode characters.

Is my data uploaded to a server?

No. All encoding/decoding operations run entirely in your browser using the native encodeURIComponent() and decodeURIComponent() APIs. Your data never leaves your device.

What if decoding fails?

Common reasons: ① The input string is not a valid URL-encoded format (e.g., %XX where XX is not a valid hexadecimal number); ② The string contains an incomplete percent-encoding (e.g., a trailing % sign); ③ The encoding used a non-UTF-8 charset (e.g., GBK), resulting in garbled text after decoding. The tool will attempt decoding and show an error message if it fails.

Is this tool free? Do I need to register?

This tool provides free daily usage, so routine lightweight needs can be met at zero cost. No registration or login is required — just open the page and use it. When you need higher processing volumes or more frequent use, subscribing to membership unlocks more benefits to handle various scenarios with ease.

What is the difference between URL encoding and Base64 encoding?

They serve different purposes: URL encoding (percent-encoding) converts special characters into %XX format so they can be safely transmitted within a URL; Base64 converts arbitrary binary data into printable ASCII characters (letters, digits, +, /, =) for transmitting binary data over text protocols. URL encoding converts byte-by-byte per character, while Base64 converts in groups of three bytes.

What does encoded Chinese look like?

A Chinese character occupies 3 bytes in UTF-8, so after URL encoding it becomes three %XX sequences. For example, "你好" is encoded as %E4%BD%A0%E5%A5%BD. When decoding, the tool restores these %XX sequences back to the original Chinese.

How much text can I process?

The tool processes text entirely in your browser, so the amount you can handle is mainly limited by browser memory. Everyday URLs, query parameters, and paragraphs are processed smoothly. For extremely long text, we recommend processing it in batches for the best experience.

Does URL encoding change the original content?

No. URL encoding is reversible and does not change the semantics of the original data. The encoded %XX sequences can be losslessly restored to the original text via decoding, with no information lost.

How are spaces encoded in a URL?

Spaces are special characters in URLs and cannot be used directly. Per the specification, a space can be encoded as %20 (recommended) or as + (in form application/x-www-form-urlencoded encoding). This tool uses the standard %20 representation for spaces.

How can I use this tool in my program?

You can use this tool directly in your browser for one-off encoding/decoding. For program integration, browsers provide native encodeURIComponent() / decodeURIComponent() functions, and backend languages have their own built-ins. This tool is especially handy for quickly verifying whether a URL encoding is correct, or copying the result for direct use.

Content last updated:2026-07-16

Related Tools

DES Encryption

DES Encryption

Online DES/2DES/3DES encryption and decryption tool, supporting all encryption modes and padding methods. Fully processed locally in the browser for security and efficiency.

AES Encryption

AES Encryption

Online AES encryption and decryption tool, supporting AES-128/192/256, covering all encryption modes and padding methods, secure, efficient, and easy to operate.

3DES Encryption

3DES Encryption

Online 3DES encryption/decryption tool, supporting all encryption modes and padding methods, fully processed locally in the browser to ensure data security.

RC4 Encryption

RC4 Encryption

Online RC4 stream cipher encryption/decryption tool, supports multiple key lengths, one-click encryption and decryption, all operations are completed locally in the browser to ensure data security.

Rabbit Encryption

Rabbit Encryption

Online Rabbit stream cipher encryption/decryption tool, using a high-speed symmetric encryption algorithm, supporting multiple key lengths. All operations are performed locally in the browser to ensure data security.

RC2 Encryption

RC2 Encryption

Online RC2 encryption and decryption tool, supporting ECB/CBC modes, variable key length and effective key bits, all processed locally in the browser to ensure data security.

IDEA Encryption

IDEA Encryption

Online IDEA International Data Encryption Algorithm Tool, supporting multiple encryption modes including ECB/CBC/CFB/OFB/CTR. All operations are performed locally in the browser to ensure data security.

Blowfish Encryption

Blowfish Encryption

Online Blowfish encryption/decryption tool supporting 128/192/256/448-bit variable keys, ECB/CBC/CFB/OFB modes, and multiple padding methods. All operations are performed locally in the browser to ensure data security.

CAST Encryption

CAST Encryption

CAST-128 (CAST5) online encryption and decryption tool, supporting multiple encryption modes such as ECB/CBC/CFB/OFB, flexible padding methods, and output encoding. All operations are performed locally in the browser, ensuring security and efficiency.

SM4 National Encryption

SM4 National Encryption

Online SM4 National Symmetric Encryption and Decryption Tool, supporting five working modes: ECB/CBC/CFB/OFB/CTR, and multiple padding methods. All operations are performed locally in the browser to ensure data security.

RSA Encryption and Decryption

RSA Encryption and Decryption

Online RSA asymmetric encryption and decryption tool, supporting key pair generation, public key encryption and private key decryption, private key signing and public key verification. All operations are performed locally in the browser to ensure data security.

MD5 Encryption

MD5 Encryption

Online MD5 hash encryption tool, supporting 16-bit/32-bit output, case switching, and file MD5 verification. All operations are completed locally in the browser, ensuring security and efficiency.

MD2 Encryption

MD2 Encryption

MD2 Encryption Tool: Generate 32-bit MD2 hash values online, supporting uppercase/lowercase output and file verification.

SHA-1 Encryption

SHA-1 Encryption

Online SHA-1 hash calculation tool for efficient text encryption and file integrity verification.

SHA-256 Encryption

SHA-256 Encryption

Online SHA-256 hash calculation tool for quick text encryption and file integrity verification.

SHA-384 Encryption

SHA-384 Encryption

Online SHA-384 hash calculation tool for fast text encryption and file integrity verification.

SHA-512 Encryption

SHA-512 Encryption

Online SHA-512 hash calculation tool, supporting text encryption and file integrity verification, quickly generating secure hash values.

SM3 National Encryption

SM3 National Encryption

Online SM3 National Hash Encryption Tool, supports text hash calculation and file verification, outputs a 256-bit hash value, compliant with GM/T 0004-2012 national standard.

Base64 Encode/Decode

Base64 Encode/Decode

Online Base64 encode/decode tool, supporting text Base64 encoding and decoding, all done locally in the browser, safe and efficient.

UTF-8 Encode/Decode

UTF-8 Encode/Decode

Online UTF-8 encoding/decoding tool, supporting conversion between text and UTF-8 hexadecimal bytes. All processing is done locally in the browser, ensuring data security.

General Membership

Enjoy membership benefits

Exclusive Benefits

  • Unlimited use of 290+ web tools
  • Cross-platform benefits
  • New tools included
  • Free updates

Basic Benefits

  • Larger file size
  • More files
  • Full features on web
  • Full features on desktop

Monthly Member Plan

¥ 8.9
Original: ¥19.9
Valid for 30 days

Quarterly Member Plan

¥ 19.9
Original: ¥59.9
As low as 6.6 yuan/month
Hot

Yearly Member Plan

¥ 69.9
Original: ¥229.9
As low as 5.8 yuan/month
Pay: ¥ 9

Please scan with WeChat to pay

Payment indicates your agreement to the relevant terms

*No 7-day unconditional refund