Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)
URL Encoder/Decoder

URL Encoder/Decoder

Encode and decode URLs instantly using percent-encoding. Parse URL components and view query parameters.

What is URL Encoding?

URL encoding (also called percent-encoding) converts characters into a format that can be safely transmitted in a URL. Special characters, spaces, and non-ASCII characters are replaced with a percent sign (%) followed by two hexadecimal digits.

Example: A space becomes %20, and the less-than sign < becomes %3C. This ensures URLs are valid and can be properly interpreted by web browsers and servers.

When Do You Need URL Encoding?

Query Parameters

When passing user input, names, or search terms in URLs

Special Characters

Characters like &, =, ?, # have special meaning in URLs

Non-ASCII Text

Unicode characters (accented letters, CJK, emoji) must be encoded

API Requests

Building URLs for REST APIs with dynamic parameters

How to Use

Encoding Text

1

Enter Text

Type or paste your text into the Input field

2

Encode

Click the Encode button to convert your text

3

View Result

The encoded result appears in the Output field

4

Copy Output

Click Copy Output to copy the result to your clipboard

Decoding Text

1

Paste Encoded Text

Paste a percent-encoded string into the Input field

2

Auto-Detection

The tool automatically detects encoded content and highlights the Decode button

3

Decode

Click Decode to convert it back to readable text

URL Breakdown

When you enter a valid URL, the tool automatically displays a breakdown showing each component:

Protocol

http, https, ftp, etc.

Host

Domain name or IP address

Port

Port number (or "default" if not specified)

Path

The resource path after the host

Query

Everything after the ?

Fragment

Everything after the #

Query Parameters: If the URL contains query parameters, they are displayed in a separate table with their keys and values for easy reference.

Features

Encode & Decode

Uses the standard encodeURIComponent and decodeURIComponent functions, which handle all Unicode characters including accented letters, CJK characters, and emoji.

Original Text

Human-Readable

  • Spaces and special characters
  • Unicode and emoji 🎉
  • Easy to read
Encoded

URL-Safe Format

  • Percent-encoded sequences
  • Safe for transmission
  • Browser compatible

Auto-Detection

As you type, the tool scans your input for percent-encoded patterns (like %20 or %E2%80%99). If detected, the Decode button is highlighted. Otherwise, the Encode button is highlighted — so you always know which action to take.

URL Parser

Enter any valid URL to see it broken down into its individual components. The parser shows protocol, hostname, port, path, query string, and fragment. Query parameters are extracted into a clean key-value table with a count badge.

Quick Actions

Paste

Paste directly from your clipboard

Sample

Load a sample URL for quick testing

Clear

Reset both input and output fields

Copy Output

Copy result with visual confirmation

Your Data Stays Private

All encoding and decoding happens in your browser:

  • No server requests — your data never leaves your device
  • No tracking — we don't collect or store any input
  • 100% client-side — complete privacy and security
Privacy Guarantee: This tool operates entirely within your browser using JavaScript. Zero data transmission to external servers means your sensitive URLs and parameters remain completely private.

Frequently Asked Questions

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URL but preserves characters like :, /, ?, #, and & that have special meaning in URLs. encodeURIComponent encodes everything except letters, digits, and - _ . ~, making it suitable for encoding individual parameter values.

This tool uses: encodeURIComponent for maximum safety when encoding query parameters and user input.

Why are spaces encoded as %20 instead of +?

The %20 encoding is the standard defined by RFC 3986 for percent-encoding. The + notation for spaces is only used in the application/x-www-form-urlencoded format (HTML forms). Using %20 is more universally compatible across different contexts and APIs.

Can I encode non-English characters?

Yes. The tool fully supports Unicode characters — including accented letters, Chinese/Japanese/Korean characters, Arabic, emoji, and more. Each character is encoded as its UTF-8 byte sequence in percent-encoded form.

  • Accented letters (é, ñ, ü)
  • CJK characters (中文, 日本語, 한국어)
  • Arabic and RTL scripts
  • Emoji and symbols (🎉, ★, ©)

What happens if I try to decode an invalid string?

If the input contains malformed percent-encoded sequences (like %ZZ or an incomplete %2), the tool will display a clear error message instead of crashing.

Error Handling: The tool gracefully handles invalid input and provides helpful feedback to correct the issue.

Is my data sent to a server?

No. All encoding and decoding is performed entirely in your browser using JavaScript. No data is transmitted to any external server.

Your privacy is our priority. This tool operates 100% client-side, ensuring your URLs and sensitive parameters never leave your device.

— Privacy-First Design Principle
Paste a URL and the tool will auto-detect whether to encode or decode
Click Sample to load an example URL with special characters
The URL Breakdown panel appears automatically when a valid URL is detected
All encoding/decoding happens in your browser — no data is sent to any server
Want to learn more? Read documentation →
1/5
Start typing to search...
Searching...
No results found
Try searching with different keywords