URL Encoder / Decoder

Developer

Encode and decode URLs with special characters. Handle percent-encoding for query strings and web requests.

What is This Tool?

A URL encoder/decoder converts text to and from percent-encoded format (RFC 3986). URL encoding replaces unsafe characters with %XX hex values, ensuring data can be safely transmitted in URLs, query strings, form submissions, and HTTP headers.

RFC 3986 defines unreserved characters (A-Z, a-z, 0-9, -, _, ., ~) that need no encoding. Reserved characters (!, #, $, &, etc.) have special URL meaning and must be encoded when used as data. Spaces can be encoded as %20 or + (in form data only).

Common Use Cases

API Query Parameters

Encode special characters in API query strings, search parameters, and filter values for safe URL transmission.

Form Data Debugging

Decode application/x-www-form-urlencoded POST data to inspect form submissions and debug input handling.

Redirect URL Construction

Properly encode callback URLs, redirect parameters, and OAuth state values embedded in URLs.

Internationalized URLs

Encode non-ASCII characters (Unicode, CJK, accented characters) for use in URLs and domain names.

Frequently Asked Questions

When should I URL-encode?

Encode any data embedded in URL components (path segments, query values, fragment). Reserved characters in data positions must always be encoded.

What is the difference between encodeURI and encodeURIComponent?

encodeURI preserves URL structure characters (://?#&=). encodeURIComponent encodes everything except unreserved characters — use it for individual parameter values.

Is %20 or + correct for spaces?

Both are valid in different contexts. %20 is standard URL encoding (RFC 3986). + is only valid in application/x-www-form-urlencoded query strings.