DevFmt/

URL Encode

Input — Text
Output — Encoded

How to use URL Encode

URL Encoder converts text into percent-encoded format that's safe to use in URLs, query strings, and form submissions. Characters that have special meaning in a URL — spaces, ampersands, question marks, slashes, and non-ASCII characters — are replaced with %-prefixed hexadecimal codes so they're transmitted correctly.

Paste or type any text into the input panel and the encoded result appears instantly. DevFmt uses JavaScript's encodeURIComponent under the hood, which encodes every reserved character — making it the correct choice for encoding individual query-parameter values rather than a whole URL.

Key features: real-time encoding, full UTF-8 support (accented letters, emoji, CJK characters), one-click copy, and a byte/character count in the status bar.

URL encoding (also called percent-encoding) is required whenever you pass data through a URL: building API request links, embedding search terms in a query string, or constructing OAuth redirect URLs. All encoding happens locally in your browser — nothing you type is ever sent to a server.

FAQ

What is URL encoding?
URL encoding (percent-encoding) replaces characters that aren't allowed in a URL with a % followed by their hexadecimal byte value. For example, a space becomes %20 and an ampersand becomes %26. This lets you safely include arbitrary text in URLs.
When should I URL-encode a value?
Encode any value you place into a query string or path segment, especially if it contains spaces, &, ?, =, /, or non-English characters. Encoding prevents the value from being misinterpreted as part of the URL structure.
What's the difference between encodeURIComponent and encodeURI?
encodeURIComponent (used here) encodes all reserved characters and is meant for individual values like a single query parameter. encodeURI leaves characters like / and ? intact because it's meant for encoding a complete URL.
Is my input sent anywhere?
No. Encoding runs entirely in your browser. Your text never leaves your machine.

Related tools

We use cookies for anonymous analytics and ads. Your tool data never leaves your browser.