URL Encode
Encode text for safe use in URLs — paste, encode, and copy instantly.
Encoded URL will appear here...About URL Encode
URL Encode is a free online tool that converts raw text and special characters into percent-encoded format that is safe to include in a URL. Characters like spaces, ampersands, quotes, and non-ASCII letters cannot appear literally in a URL without breaking it. This tool replaces each unsafe character with a percent sign followed by the two-digit hexadecimal code for that byte — for example, a space becomes %20 and a plus sign becomes %2B.
The tool provides two distinct encoding modes that match the two standard JavaScript functions. Component mode uses encodeURIComponent(), which encodes every character that is not a letter, digit, or one of the unreserved symbols - _ . ! ~ * ' ( ). This is the right choice when encoding a single query parameter value or a form field before appending it to a URL. Full URI mode uses encodeURI(), which leaves the structural characters :, /, ?, #, [, ], @, !, $, &, ', (, ), *, +, ,, ;, and = untouched so that an already-formed URL keeps its shape. Use Full URI mode when you have a complete URL that may contain non-ASCII characters in the path or query string.
Every encoding operation runs entirely inside your browser using the native JavaScript encodeURIComponent and encodeURI functions — no text is transmitted to any server. That means passwords, API keys, private endpoint paths, and any other sensitive query data stay on your own machine. The tool is free to use without a sign-up, and there are no rate limits or character length caps.
Key Features
Two encoding modes in one tool
Switch between Component mode (encodeURIComponent) for individual query values and Full URI mode (encodeURI) for complete URLs without leaving the page.
100% client-side processing
Encoding runs in the browser using native JavaScript. Your text, API keys, and query parameters are never uploaded or logged anywhere.
Handles non-ASCII and Unicode
Multi-byte characters such as accented letters, CJK characters, and emoji are correctly converted to their UTF-8 percent-encoded sequences, which is the format all modern web servers expect.
Accurate to RFC 3986
The underlying encodeURIComponent and encodeURI functions follow the W3C and IETF percent-encoding specification, so the output is accepted by any standards-compliant HTTP client or server.
Instant one-click copy
Copy the encoded result to your clipboard with a single button and paste it directly into a URL builder, terminal curl command, or API request.
Clear and reset in one click
The delete button wipes both the input and output fields simultaneously so you can start a fresh encoding without manually selecting and deleting text.
How to Use
Enter Text
Type or paste the text or URL you want to encode into the input pane.
Select Mode
Choose Component mode for query values or Full URI mode for complete URLs.
Encode & Copy
Click "Encode" to convert your text, then copy the result.
Example
A search query with spaces, a special character, and a non-ASCII letter is encoded in Component mode. Each unsafe character becomes its percent-encoded equivalent so the string can be safely appended to a URL as a query parameter value.
café & bakery open now? caf%C3%A9%20%26%20bakery%20open%20now%3F Common Use Cases
- arrow_circle_right
Building API query strings by hand
When constructing a REST API request manually — in a terminal, a Postman-style client, or a script — Component mode encodes each parameter value so that ampersands and equals signs in the value itself do not break the query string parser on the server.
- arrow_circle_right
Encoding redirect and callback URLs
OAuth flows, single sign-on providers, and payment gateways accept a return_url or callback_url parameter. The entire destination URL must be percent-encoded before it can be embedded as a query value, which is exactly what Component mode produces.
- arrow_circle_right
Fixing non-ASCII characters in internationalized URLs
Paths containing accented letters or CJK characters often work in the browser address bar but fail in HTTP libraries or curl. Full URI mode converts those characters to valid percent-encoded sequences while leaving the rest of the URL intact.
- arrow_circle_right
Sanitizing user-supplied URL fragments before concatenation
If your code concatenates a user-entered search term or file name directly into a URL string, a raw ampersand or hash character in that value will silently corrupt the URL. Encode the value first with this tool to verify what the output should look like before writing the encoding logic.
- arrow_circle_right
Preparing mailto links with pre-filled subject and body
The subject and body parameters in a mailto: link must be percent-encoded so that spaces, newlines, and punctuation in the message text are correctly interpreted by the mail client. Component mode handles this encoding in one step.