Free Online URL Encoder — Percent-Encode Text & Query Strings
Percent-encode text, query parameters, and full URLs. Choose encodeURIComponent or encodeURI, spaces as %20 or +.
Quick answer
To URL encode text, paste it into the KaviForge URL Encoder. Use "Component" mode (encodeURIComponent) for query parameter values — it encodes &, =, ?, / and spaces. Use "Full URL" mode (encodeURI) to encode a complete URL while keeping its structure. Turn on "Spaces as +" for HTML form encoding.
URL-encode text and query strings in your browser. Switch between encodeURIComponent and encodeURI, and encode spaces as %20 or +.
Encoding query parameter values correctly prevents broken links, lost data after &, and injection bugs when building URLs for APIs, redirects, and tracking links.
Related reading: A Simple Guide to Parsing JSON in JavaScript (ES6+), and What is a JSON Payload? A Simple Guide for API Beginners.
How to URL Encode Text
- 1Paste the text, parameter value, or URL into the input box.
- 2Choose "Component" to encode a value, or "Full URL" to keep :, /, ? and & intact.
- 3Enable "Spaces as +" if the data is for application/x-www-form-urlencoded forms.
- 4Enable "Encode each line separately" to bulk encode a list of values.
- 5Copy or download the encoded output.
Features
Component & Full URL Modes
Matches JavaScript encodeURIComponent and encodeURI behavior exactly.
UTF-8 Percent Encoding
Non-ASCII characters and emoji are encoded as multi-byte UTF-8 sequences.
Spaces as + Option
Produce form-style encoding used by HTML forms and many APIs.
Bulk Line Encoding
Encode hundreds of values at once — one per line.
Live Output
The encoded result updates instantly while you type.
Private
Runs in your browser; nothing is sent to a server.
When to Use the URL Encoder
Build API query strings
Encode search terms, emails, and JSON values before adding them to a request URL.
Create redirect and callback URLs
A URL passed as a parameter (like ?redirect=) must be fully encoded to survive.
UTM and tracking links
Encode campaign names containing spaces, & or special characters.
Mailto and share links
Encode subject and body text for mailto: links or social share URLs.
About the URL Encoder
Component mode encodes every character except A–Z a–z 0–9 - _ . ! ~ * ' ( ). Full URL mode additionally preserves reserved characters such as : / ? # [ ] @ & = + $ , ;.
Rule of thumb: encode each parameter value with Component mode, then join them into the URL — never encode a whole URL with Component mode unless it is itself a parameter value.
URL Encoder FAQs
How do I URL encode a string?
Paste it into the KaviForge URL Encoder with "Component" mode selected. The percent-encoded result appears instantly.
What is the difference between encodeURI and encodeURIComponent?
encodeURI keeps URL structure characters like : / ? & = unencoded, so it is for complete URLs. encodeURIComponent encodes them too, so it is for individual parameter values.
Should spaces be %20 or +?
In URL paths and most query strings use %20. HTML form submissions (application/x-www-form-urlencoded) use +. Enable "Spaces as +" for form encoding.
How are non-English characters encoded?
They are converted to UTF-8 bytes and each byte is written as %XX. For example, ü becomes %C3%BC.
Can I encode many values at once?
Yes. Enable "Encode each line separately" and paste one value per line.
Is my data sent anywhere?
No. Encoding happens locally in your browser.
Popular URL Encoder searches
- URL Encode Spaces to %20Turn spaces into %20 with encodeURIComponent. See the difference between %20 and +, and encode any string online.
- encodeURIComponent OnlineRun encodeURIComponent in the browser. Encode query values, JSON snippets and reserved characters exactly as JavaScript does.
- URL Encode Special CharactersPercent-encode &, =, ?, # and / so they can sit safely inside a query value. Free online URL encoder.
- Encode Query String ParametersPercent-encode query parameter values before building a URL. Avoid broken requests caused by spaces, ampersands and Unicode.
- URL Encode UTF-8 and UnicodePercent-encode accents, non-Latin letters and emoji as UTF-8 bytes. See why café becomes caf%C3%A9.
- HTML Form URL Encoding (Spaces as +)Encode text the way HTML forms do: spaces become +, and other reserved characters become %HH. application/x-www-form-urlencoded.
- encodeURI vs encodeURIComponentSee the difference between encodeURI and encodeURIComponent on the same URL. Learn which one belongs in query values.
- Bulk URL EncoderURL-encode many lines at once. Paste a list of values or URLs and encode each line independently.
- Encode a URL for an API RequestPercent-encode path and query values before calling an API. Avoid 400s caused by spaces, Unicode and reserved characters.
- URL Encode & and =Encode & as %26 and = as %3D so they can appear inside a single query value without breaking the string.
Related Developer Tools
URL Decoder
Decode percent-encoded URLs and query strings, and see every query parameter in a table.
Base64 Encoder
Encode text, files, and images to Base64 or data URIs. UTF-8 safe, with URL-safe Base64URL option.
JSON Formatter & Validator
Pretty print, beautify, minify, and validate JSON online free. Tree view, file upload, private browser-only.
Related Guides & Tutorials
A Simple Guide to Parsing JSON in JavaScript (ES6+)
Parse a JSON payload in JavaScript with JSON.parse() and ES6+. See examples, then pretty print or minify JSON with our free online tool.
What is a JSON Payload? A Simple Guide for API Beginners
What is a payload in an API? See a sample JSON payload, payload JSON, and API payload examples — then format one with our free tool.