Dev Tools

URL Encoder/Decoder

Encode and decode URL strings quickly. URL encoding converts special characters into a format that can be safely transmitted over the internet.

Also known as percent-encoding, it replaces unsafe characters with a "%" followed by their hexadecimal value.

Your result will appear here...

Common Use Cases

Query String Parameters

Safely encode values for URL query strings, especially when they contain special characters like &, =, or spaces.

Form Data Submission

HTML forms use URL encoding (application/x-www-form-urlencoded) to send data to servers.

API Integration

Encode parameters when building API request URLs to ensure special characters don't break the request.

Debug Encoded URLs

Decode URL-encoded strings from logs or browser URLs to read the original values.

Frequently Asked Questions

What is URL encoding?

URL encoding (also called percent-encoding) is a method to convert characters into a format that can be safely used in URLs. Characters that have special meaning in URLs (like &, ?, =, /) or non-ASCII characters are replaced with a "%" followed by their two-digit hexadecimal value.

Which characters need to be encoded?

Characters that must be encoded include: spaces (become %20 or +), & (%26), = (%3D), ? (%3F), / (%2F), # (%23), and any non-ASCII characters like accented letters. Letters (A-Z, a-z), digits (0-9), and a few special characters (-, _, ., ~) are safe and don't need encoding.

What's the difference between encodeURI and encodeURIComponent?

In JavaScript, encodeURI encodes a full URI but preserves characters that have special meaning in URLs (like /, ?, &). encodeURIComponent encodes everything except letters, digits, and a few safe characters. This tool uses component-level encoding, similar to encodeURIComponent.

Why do spaces become + or %20?

Both represent spaces in URL encoding. The "+" notation comes from the application/x-www-form-urlencoded format used in HTML forms, while %20 is the standard percent-encoding. This tool uses "+" for spaces (form encoding style), which is the most common format for query parameters.

Made by devs, for devs. 💻