URL Encoder β€” Percent-Encode Text for URLs Online

Type or paste text and see the URL-encoded output in real time. Choose between component encoding (for query values), full URL encoding (preserves structure), or full percent-encoding (every non-alphanumeric character).

When to Use URL Encoding

URL encoding is required whenever you include user input, special characters, or non-ASCII text in a URL. Common scenarios include building API query strings, encoding OAuth redirect URIs, preparing UTM parameters for marketing campaigns, and handling file paths with spaces. Without encoding, characters like &, =, and # break URL structure.

Three Encoding Modes

βœ“Component (encodeURIComponent): Encodes everything except A-Z, a-z, 0-9, -, _, ., !, ~, *, ', (, ). Use for query parameter values, form data, and any single URL component.
βœ“Full URL (encodeURI): Preserves URL structure characters like :, /, ?, #, &, =. Use when encoding a complete URL while keeping it navigable.
βœ“All Characters: Percent-encodes every non-alphanumeric character. Maximum encoding for paranoid mode or strict systems.

Code Examples

JavaScript: encodeURIComponent('hello world') β†’ hello%20world
Python: urllib.parse.quote('hello world')
PHP: urlencode('hello world') (uses + for spaces) or rawurlencode() (uses %20)
Go: url.QueryEscape("hello world")

Start typing below β€” the encoder is already active.

Spaces:
Plain Text0 chars
Encoded Output
Encoded output appears here…