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 +.

Need to decode a URL? Use the URL Decoder
0 chars
0 chars

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

  1. 1Paste the text, parameter value, or URL into the input box.
  2. 2Choose "Component" to encode a value, or "Full URL" to keep :, /, ? and & intact.
  3. 3Enable "Spaces as +" if the data is for application/x-www-form-urlencoded forms.
  4. 4Enable "Encode each line separately" to bulk encode a list of values.
  5. 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.