URL-encode a String
Percent-escape a string so it's safe to use in a URL. Runs entirely in your browser, so your data never leaves your device.
0 chars · 0 lines
Output
The result appears here as you type.
How to use URL-encode a String
- 1. Paste the string. Enter the text you need to embed in a URL into the input pane, including any spaces, ampersands, or special characters that would otherwise break the link.
- 2. Turn on Encode spaces as +. Turn this on if the destination expects application/x-www-form-urlencoded style query strings, which use a plus sign for spaces instead of the more common %20.
- 3. Copy the encoded string. Copy the percent-escaped result out of the output pane and drop it directly into a URL query parameter or form submission where raw special characters are not allowed.
When to use URL-encode a String
URL-encode a String percent-escapes characters that are unsafe to use directly inside a URL, such as spaces, ampersands, and equals signs. Use it whenever you are building a link or query string by hand and need a value embedded safely.
- Building a query string parameter by hand. You are constructing a link with a search term or filter value as a query parameter, and the value contains spaces or an ampersand that would otherwise break the URL structure.
- Encoding a value for a share link. You want to generate a shareable URL that includes a title or message as a parameter, and encoding it first prevents special characters from corrupting the link.
- Passing a file name with special characters in a URL. A file name includes spaces or symbols and needs to be referenced in a URL path or query parameter, and encoding it keeps the link valid across browsers and servers.
- Preparing a redirect target for a query parameter. You are building a redirect link where the destination URL itself needs to be passed as a query value, and encoding it prevents its own slashes and equals signs from breaking the outer URL.
Examples
Escape a query value
Input
a b&c=d
Output
a%20b%26c%3Dd
About the URL-encode a String tool
URL-encode a String is a free online tool that works entirely inside your web browser. Percent-escape a string so it's safe to use in a URL. Because the processing happens on your own device, nothing you enter is uploaded, logged or stored anywhere.
This page is one of 159 String utilities on EditSafely. Each one does a single job well, and all of them follow the same rule: your input stays on your machine.
You can shape the output with the Encode spaces as + setting, and the result refreshes the moment you change it. A worked example further down the page shows exactly what the tool produces for a real input.
Because nothing leaves your device, the tool is suitable for sensitive content such as internal documents, credentials or customer data. It also responds instantly, since every keystroke is handled on your own machine rather than by a remote API.
Frequently asked questions
Is URL-encode a String free to use?
Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.
Is it safe to paste sensitive or confidential data?
Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.
How much text can I process at once?
There is no fixed limit. Because the work happens on your own device rather than on a shared server, the practical ceiling is your machine's memory, which comfortably handles inputs far larger than typical online tools allow.
Do I need to sign up or install anything?
No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.
How do I use the result?
The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.