URL Encoder
Encode strings for safe use in URLs. Free, no signup, runs in your browser.
How It Works
Paste any text into the input field and click Encode. Special characters are replaced with their percent-encoded equivalents (e.g. space becomes %20, & becomes %26).
Everything runs in your browser using the native encodeURIComponent function. No server receives your data.
What Is URL Encoding?
URL encoding (also called percent encoding) replaces unsafe characters in a URL with a % sign followed by two hexadecimal digits. This is necessary because URLs can only contain a limited set of ASCII characters.
Common use cases include encoding query parameters, form data, API requests, and any text that needs to be safely embedded in a URL.
Common Character Encodings
| Character | Encoded |
|---|---|
| space | %20 |
| & | %26 |
| = | %3D |
| ? | %3F |
| / | %2F |
| # | %23 |
| + | %2B |
| @ | %40 |
When to Use It
Reach for URL encoding when you are building a link by hand, passing user input into a query string, assembling an API request, or embedding a value that contains spaces, ampersands or non-English characters. Because this tool uses encodeURIComponent, it encodes a single value or component — the reserved characters that separate parts of a URL, like :, /, ? and &, are all escaped. That makes it ideal for one parameter value at a time rather than an entire, already-structured URL.
Frequently Asked Questions
How do I encode a URL or text online?
Paste your text or URL into the input box and click Encode. The encoded result appears below, and the Copy result button puts it on your clipboard. Everything happens instantly in your browser.
What does URL encoding do to special characters?
It replaces characters that are unsafe in a URL with a percent sign followed by their hexadecimal code. A space becomes %20, an ampersand becomes %26, a question mark becomes %3F and a slash becomes %2F, so the text can travel safely inside a URL.
Which function does this tool use to encode?
It uses the browser's native encodeURIComponent function. That means letters, digits and the characters - _ . ! ~ * ' ( ) are left as-is, while reserved characters like & = ? / : and # are percent-encoded, which is exactly what you want for a single query-parameter value.
Does it handle spaces, emoji and non-English characters?
Yes. Unicode text such as accented letters, emoji and non-Latin scripts is first converted to UTF-8 and then percent-encoded, so it survives being placed in a URL. Spaces become %20.
How do I decode a URL back to plain text?
This tool only encodes. To turn a percent-encoded string back into readable text, use the URL Decoder. Both tools run entirely in your browser and never upload what you enter.