WALUDO Toolbox
CONVERT.03 URL CODEC

URL Encode / Decode

Supports both full URL and individual parameter encoding modes, bidirectional real-time sync, instant results as you type.

RAW

Plaintext

ENC

After Encoding

§ 01

How to Encode and Decode URLs Online

1
1

Enter your text

Type or paste your original URL text in the left editor for encoding, or paste an encoded URL string in the right editor for decoding.

2
2

Choose the encoding mode

Check “Preserve URL Structure” to use encodeURI mode for full URLs, or uncheck it to use encodeURIComponent mode for individual parameter values.

3
3

Copy the result

Click the copy button to copy the encoded or decoded result to your clipboard. Bidirectional sync is supported: typing on the left auto-encodes to the right, and typing on the right auto-decodes to the left.

§ 02

About URL Encode/Decode

About URL Encode/Decode

URL encoding (also known as percent-encoding) is a fundamental technique for web transmission. Since URLs were designed to only accept English letters, digits, and a few special symbols (-_.~), characters like Chinese text, spaces, or emoji must be converted to a % followed by two hexadecimal digits. For example, the Chinese text “你好” becomes %E4%BD%A0%E5%A5%BD after encoding, and a space becomes %20.

This tool provides two encoding modes. The Preserve URL Structure mode (encodeURI) encodes a full URL while keeping structural characters like ://, /, ?, &, and = intact. The Full Encoding mode (encodeURIComponent) treats all special characters equally and is suited for encoding individual query parameter values. All encoding and decoding operations run locally in your browser — no data is ever uploaded to any server.

Use Cases & How It Works

The core rule of URL encoding: safe characters (A-Z, a-z, 0-9, and -, _, ., ~) remain unchanged. All other characters are first converted to UTF-8 byte sequences, then each byte is represented as %XX (where XX is the hexadecimal value). Decoding reverses this process, converting %XX sequences back to the original characters.

Common use cases include: encoding query parameters with non-ASCII characters in frontend development using encodeURIComponent(); manually constructing compliant encoded URLs when debugging RESTful APIs; encoding Chinese or special characters in UTM marketing links to ensure cross-platform compatibility; decoding URLs from server logs or Google Analytics exports for data analysis; encoding special characters in links embedded within HTML emails.

§ 03

Common Character URL Encoding Reference

Character
URL Encoded
Description
Space
%20
Spaces must be encoded in URLs, otherwise they will be truncated
!
%21
Exclamation mark
"
%22
Double quotation mark
#
%23
Hash, used as a URL fragment identifier
$
%24
Dollar sign
%
%25
The percent sign itself must also be encoded
&
%26
Ampersand, used as a URL parameter separator
+
%2B
Plus sign; can also represent a space in query parameters
,
%2C
Comma
/
%2F
Slash; encodeURI preserves this character
:
%3A
Colon
=
%3D
Equals sign, used as a key-value separator
?
%3F
Question mark, query string delimiter
@
%40
At sign
你好
%E4%BD%A0%E5%A5%BD
Chinese characters are UTF-8 encoded then byte-by-byte converted to %XX format
😊
%F0%9F%98%8A
Emoji follows the same UTF-8 percent-encoding rule
§ 04

FAQ

Q1What is URL encoding (percent-encoding)?

URL encoding (also known as percent-encoding) is a mechanism for encoding special characters within a Uniform Resource Locator (URL). Since URLs can only contain letters, digits, and a few special symbols, other characters (such as Chinese text, spaces, question marks, equals signs, etc.) must be converted to a `%` followed by two hexadecimal digits.

Q2What does the “Preserve URL Structure” option do?

It skips encoding URL structural characters like http://, /, ?, &, =, and only encodes text such as Chinese characters or spaces. This is ideal for encoding a complete URL link.

Q3Why does decoding show a “Parse Error”?

If the input contains characters that do not conform to percent-encoding rules (e.g., a standalone `%` not followed by two hexadecimal digits, or invalid UTF-8 sequences), the browser will throw an error during decoding. Please check that your string is complete.

Q4Will my data be uploaded?

No. All data on this tool site is processed locally in your browser — no user data or information is ever uploaded or saved.

Q5What's the difference between URL encoding and Base64 encoding?

They serve different purposes. URL encoding ensures URLs contain only valid characters, producing %XX format strings. Base64 encoding converts arbitrary binary data to plain text, commonly used for email attachments and Data URIs. URL-encoded results can be placed directly in URLs, while standard Base64 may contain + and / that require additional handling.

Q6Should I use encodeURI or encodeURIComponent?

Use encodeURI for whole URLs (preserving structural characters like ://, /, ?) and encodeURIComponent for individual parameter values. For example, encodeURI("https://example.com/search?q=hello world") preserves :// and ?, while encodeURIComponent("hello world") encodes the space as %20.

Q7Does the length increase from URL encoding affect page load speed?

The impact is negligible — the added length is typically tens to hundreds of bytes. However, browsers and servers often impose URL length limits (around 2048 characters). If your original URL is already near this limit, the encoding overhead may cause the request to fail.

Q8Why is a space sometimes encoded as %20 and sometimes as +?

This is a historical artifact. Within the query string portion (after ?), the application/x-www-form-urlencoded specification allows + to represent a space. In other parts of the URL (path, domain), spaces must use %20. This tool uses JavaScript standard APIs, so spaces are always encoded as %20.

✳ WALUDO TOOLBOX ✳ Browser-Native Toolset · NO SERVER · NO DATA COLLECTION

Your files never leave your computer · FILES STAY LOCAL · PRIVACY FIRST