Back to Home
Blog

URL Encoder

Encode and decode URLs

Mode:
Type:

Input (Plain)

0 chars

Quick Examples:

Options

Standard encoding: Encodes special characters except - _ . ~

Output (Encoded)

0 chars

URL Encoding Reference

Reserved Characters (must encode):

! * ' ( ) ; : @ & = + $ , / ? # [ ]

Unreserved Characters (safe):

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

Common Encodings:

Space → %20 or +
@ → %40
& → %26
= → %3D
/ → %2F
? → %3F

Frequently Asked Questions

What is URL encoding?

URL encoding (also called percent encoding) converts characters that are not allowed in URLs into a % followed by two hexadecimal digits. For example, a space becomes %20 and & becomes %26. This ensures URLs are valid and correctly interpreted by browsers and servers.

When should I URL encode a string?

Encode strings when you include them in query parameters, form data, or any part of a URL that might contain special characters like spaces, ampersands, equals signs, or non-ASCII characters. This prevents them from being misinterpreted as URL syntax.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URL and skips characters that have special meaning in a URL (like /, ?, #). encodeURIComponent encodes a URL component (like a single query value) and also encodes those special characters. Use encodeURIComponent for individual parameter values.